Re: [Rails] do tests save anything in the test db?
On Sun, Jul 17, 2011 at 7:12 AM, 7stud -- <lists@ruby-forum.com> wrote:
> I have some validation tests that create!() Users, but after running the
> tests I don't see anything in my test db. What is supposed to happen?
Yes. By default, the Rails test framework is configured to run each
test method in a transaction which gets rolled back at the end of that
test method. That way each test method is isolated from data that
might otherwise be left lying around.
HTH,
David
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home