Skip to content
Browse files

Add spec/support files

  • Loading branch information...
1 parent 6ab057e commit cdf13dd110b652dec0832d8460883c8890ea9029 @radar committed
Showing with 14 additions and 0 deletions.
  1. +14 −0 spec/support/authentication_helpers.rb
View
14 spec/support/authentication_helpers.rb
@@ -0,0 +1,14 @@
+module AuthenticationHelpers
+ def sign_in_as!(user)
+ visit '/login'
+ fill_in I18n.t('email'), :with => user.email
+ fill_in I18n.t('password'), :with => 'secret'
+ click_button I18n.t('login')
+ end
+
+end
+
+RSpec.configure do |c|
+ c.include AuthenticationHelpers, :type => :request
+end
+

0 comments on commit cdf13dd

Please sign in to comment.
Something went wrong with that request. Please try again.