Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update RSpec examples

  • Loading branch information...
commit af4b32aa30926657105cb9cea095ed6b75ca2bdc 1 parent 668dc3c
Joël Quenneville JoelQ authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 README.md
6 README.md
View
@@ -102,11 +102,13 @@ describe "the signup process", :type => :feature do
end
it "signs me in" do
+ visit '/sessions/new'
within("#session") do
fill_in 'Login', :with => 'user@example.com'
fill_in 'Password', :with => 'password'
end
click_link 'Sign in'
+ page.should have_content 'Success'
end
end
```
@@ -131,21 +133,25 @@ feature "Signing up" do
end
scenario "Signing in with correct credentials" do
+ visit '/sessions/new'
within("#session") do
fill_in 'Login', :with => 'user@example.com'
fill_in 'Password', :with => 'caplin'
end
click_link 'Sign in'
+ page.should have_content 'Success'
end
given(:other_user) { User.make(:email => 'other@example.com', :password => 'rous') }
scenario "Signing in as another user" do
+ visit '/sessions/new'
within("#session") do
fill_in 'Login', :with => other_user.email
fill_in 'Password', :with => other_user.password
end
click_link 'Sign in'
+ page.should have_content 'Invalid email or password'
end
end
```
Please sign in to comment.
Something went wrong with that request. Please try again.