Skip to content

Instantly share code, notes, and snippets.

@ecavazos
Created July 5, 2011 16:50
Show Gist options
  • Save ecavazos/1065248 to your computer and use it in GitHub Desktop.
Save ecavazos/1065248 to your computer and use it in GitHub Desktop.
Include acceptance helper methods into request specs
module AcceptanceHelper
def sign_in(user=Factory.create(:user))
visit new_user_session_path
fill_in 'user_email', :with => user.email
fill_in 'user_password', :with => user.password
click_button 'Sign in'
end
end
RSpec.configure do |config|
config.include AcceptanceHelper, :type => :request
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment