Skip to content

Instantly share code, notes, and snippets.

@bigfleet
Created December 4, 2014 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bigfleet/11b3b297d79a7ddcb9f8 to your computer and use it in GitHub Desktop.
Save bigfleet/11b3b297d79a7ddcb9f8 to your computer and use it in GitHub Desktop.
use_cases.rb
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