Skip to content

Instantly share code, notes, and snippets.

@AVGP
Created March 25, 2012 23:21
Show Gist options
  • Save AVGP/2201424 to your computer and use it in GitHub Desktop.
Save AVGP/2201424 to your computer and use it in GitHub Desktop.
describe "Users" do
describe "Sign up" do
describe "with invalid data" do
it "should not create user" do
lambda do
visit signup_path
fill_in "Name", :with => ""
fill_in "Email", :with => ""
fill_in "Password", :with => ""
fill_in "Confirm password", :with => ""
click_button
response.should render_template('new')
response.should have_selector("div.error")
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