[Rspec-users] fixtures data persists?

alan maybourne alan.maybourne at hotmail.co.uk
Wed Oct 25 16:13:19 EDT 2006

I'm not sure if this is a feature or a bug, but if I load a set of fixtures 
in one context, the data remains in the database and is available to the 
next context, even if the next context doesn't explicitly load that set of 

context "saved User objects" do
  fixtures :users

context "new User objects" do


if I call User.find(1) from a spec in the 'new User objects' context, it'll 
find the object loaded in the earlier context. I'd like to disable this if 
possible. Could someone tell me how?


Windows Live™ Messenger has arrived. Click here to download it for free! 

More information about the Rspec-users mailing list