[Rspec-users] fixtures data persists?
aslak.hellesoy at gmail.com
Thu Oct 26 11:25:02 EDT 2006
On 10/25/06, alan maybourne <alan.maybourne at hotmail.co.uk> wrote:
> 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?
This is a Rails feature. You'd get the same behaviour with Test::Unit.
See the two "Should fixtures be transactional?" threads here:
Please ask further questions about this in the Rails forum.
> Windows Live™ Messenger has arrived. Click here to download it for free!
> Rspec-users mailing list
> Rspec-users at rubyforge.org
More information about the Rspec-users