Frederick Cheung wrote:
> On Sep 1, 9:41�pm, brianp <[email protected]> wrote:
>>
>> I think the problem is that after I run the delete method in the test
>> the fixtures are reloaded before the next assert so the status is put
>> back to "published" when it should be "deleted". I think this is the
>> problem only because when I step through the process in the debugger I
>> see:
> 
> It's the opposite problem: fixtures are not reloaded, so although the
> copy in the database now has status deleted words(:one) is now a stale
> object - you just need to reload it before making testing whether it's
> status has changed.
> 
> Fred

It's crap like this that has put me off fixtures.  Try something like 
Machinist instead.  Fixtures just don't work for many common testing 
scenarios.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to