Permalink
Browse files

update tests

  • Loading branch information...
Bartosz Pranczke
Bartosz Pranczke committed Mar 29, 2012
1 parent 3b455f3 commit 806e7dff775bf4e71062f04827128ad7b0c5b24c
Showing with 8 additions and 0 deletions.
  1. +8 −0 spec/support/utilities.rb
@@ -0,0 +1,8 @@
+def sign_in(user)
+ visit signin_path
+ fill_in "Username", with: user.username
+ fill_in "Password", with: user.password
+ click_button "Sign in"
+ # Sign in when not using Capybara as well.
+ cookies[:auth_token] = user.auth_token
+end

0 comments on commit 806e7df

Please sign in to comment.