Created
December 23, 2014 10:28
-
-
Save paulspencerwilliams/d4023290791be847145d to your computer and use it in GitHub Desktop.
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
Given Paul is a registered user | |
When I log in as Paul | |
Then I will see Paul's homepage |
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
def navigate | |
visit 'server/blah' | |
end | |
def login_as (username, password) | |
fill_in (:username, username) | |
fill_in (:password, password) | |
end |
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
def given_x_is_a_registered_user(username) | |
FactoryGirl.create(:user name => paul) | |
end | |
def when_i_log_in_as_x (username) | |
loginpage.navigate | |
loginpage.login_as(username, defaultpassword) | |
end | |
def then_i_will_see_x_homepage(username) | |
homepage.is_visible | |
homepage.shows_welcome(username) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment