Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.47 KB | None | 0 0
  1. subject {page}
  2. describe "sign in page" do
  3.   before { visit signin_path}
  4.   it { should have_title("Sign in")}
  5.   it { should have_content("Sign in")}
  6.  
  7.   describe "with invalid information" do
  8.     before { click_button "Sign in" }
  9.  
  10.     it { should have_title 'Sign in' }
  11.     it { should have_error_message("Invalid")}
  12.  
  13.     describe "after visiting another page" do
  14.       before { click_link "Home" }
  15.  
  16.       it { should_not have_error_message("Invalid")}
  17.     end
  18.   end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement