Created
August 25, 2010 01:52
-
-
Save mfurtak/548687 to your computer and use it in GitHub Desktop.
RSpec & Webrat gorgeousness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "failure" do | |
it "should not make a new user" do | |
lambda do | |
visit signup_path | |
fill_in "Name", :with => "" | |
fill_in "Email", :with => "" | |
fill_in "Password", :with => "" | |
fill_in "Confirmation", :with => "" | |
click_button | |
response.should render_template('users/new') | |
response.should have_selector("div#error_explanation") | |
end.should_not change(User, :count) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment