[rspec-users] before(:all) leaves records in database

David Chelimsky dchelimsky at gmail.com
Fri Nov 25 11:14:46 EST 2011


On Nov 25, 2011, at 8:04 AM, Zhi-Qiang Lei wrote:

> Hi,
> 
> When I test my Rails controller, I find that records created in before(:all) remain in database while records created in before(:each) and let are wiped out after testing. This made me run "rake test:prepare" for every new test. Is that normal?

Yes. before(:all) is not run in a transaction.


More information about the rspec-users mailing list