File tree 2 files changed +11
-11
lines changed
2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
1
Feature : Signing in
2
-
2
+
3
3
Scenario : Unsuccessful signin
4
4
Given a user visits the signin page
5
- When he submits invalid signin information
6
- Then he should see an error message
7
-
5
+ When they submit invalid signin information
6
+ Then they should see an error message
7
+
8
8
Scenario : Successful signin
9
9
Given a user visits the signin page
10
10
And the user has an account
11
11
When the user submits valid signin information
12
- Then he should see his profile page
13
- And he should see a signout link
12
+ Then they should see their profile page
13
+ And they should see a signout link
Original file line number Diff line number Diff line change 2
2
visit signin_path
3
3
end
4
4
5
- When /^he submits invalid signin information$/ do
5
+ When /^they submit invalid signin information$/ do
6
6
click_button "Sign in"
7
7
end
8
8
9
- Then /^he should see an error message$/ do
9
+ Then /^they should see an error message$/ do
10
10
page . should have_selector ( 'div.alert.alert-error' )
11
11
end
12
12
18
18
When /^the user submits valid signin information$/ do
19
19
visit signin_path
20
20
fill_in "Email" , with : @user . email
21
- fill_in "Password" , with : @user . password
21
+ fill_in "Password" , with : @user . password
22
22
click_button "Sign in"
23
23
end
24
24
25
- Then /^he should see his profile page$/ do
25
+ Then /^they should see their profile page$/ do
26
26
page . should have_selector ( 'title' , text : @user . name )
27
27
end
28
28
29
- Then /^he should see a signout link$/ do
29
+ Then /^they should see a signout link$/ do
30
30
page . should have_link ( 'Sign out' , href : signout_path )
31
31
end
You can’t perform that action at this time.
0 commit comments