Created
December 4, 2014 23:42
-
-
Save bigfleet/11b3b297d79a7ddcb9f8 to your computer and use it in GitHub Desktop.
use_cases.rb
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 login(user=nil) | |
u = user || create(:user) | |
visit new_user_session_path | |
within("#new_user") do | |
fill_in 'Email', :with => u.email | |
fill_in 'Password', :with => '12345678' | |
click_button 'Log in' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment