I am having a problem with the following test and I cannot figure out
why. I am working through the tutorial on http://ruby.railstutorial.org/
and just finished chapter 9. It seems the following spec test works once
and then in order to get it to pass again I have to purge the test
database. This doesn't seem necessary if I have transactional fixtures
enabled (which I do).
Here is the test:
describe "success" do
it "should make a new user" do
fill_in "Name", :with => "Example User"
fill_in "Email", :with => "firstname.lastname@example.org"
fill_in "Password", :with => "foobar"
fill_in "Confirmation", :with => "foobar"
response.should have_selector("div.flash.success", :content
end.should change(User, :count).by(1)