Re: why database_cleaner doesn''t clean?

Mauro
Thu, 02 Jun 2011 18:25:43 -0000

On 2 June 2011 17:15, radhames brito
<rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> Try posting a bit of the test.log to seed what is happening to the db

Sorry I''ve found that the problem is when I run autotest.
If I run rspec individually for every controller they passes.
If I run autotest they don''t pass.
For sector controller test I''ve posted the code, if I run rspec for it
passes.
If I run autotest it says:

SectorsController GET index assigns all sectors as @sectors
     Failure/Error: assigns(:sectors).should eq([sector])

       expected [#<Sector id: 2603, name: "Sector-1", created_at:
"2011-06-02 18:20:15", updated_at: "2011-06-02
18:20:15">]
            got [#<Sector id: 2548, name: "Sector-1", created_at:
"2011-06-02 18:19:46", updated_at: "2011-06-02
18:19:46">, #<Sector
id: 2549, name: "Sector-1", created_at: "2011-06-02
18:19:46",
updated_at: "2011-06-02 18:19:46">, #<Sector id: 2550


etc.