Created
November 29, 2011 22:38
-
-
Save daniel-nelson/1406927 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 i_sign_in(user, password='secret') | |
| if user.is_a?(User) | |
| visit new_user_session_path | |
| within('#user_new') do | |
| fill_in('Email', :with => user.email) | |
| fill_in('Password', :with => password) | |
| click_button('Sign in') | |
| end | |
| elsif user.is_a?(Admin) | |
| visit new_admin_session_path | |
| within('#admin_new') do | |
| fill_in('Email', :with => user.email) | |
| fill_in('Password', :with => password) | |
| click_button('Sign in') | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment