Created
September 25, 2012 06:49
Revisions
-
Bregor revised this gist
Sep 25, 2012 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ describe AccountsController do before(:each) do login_user end -
Bregor revised this gist
Sep 25, 2012 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,8 @@ module SpecHelpers def login_user(user = nil) @request.env["devise.mapping"] = Devise.mappings[:user] @user ||= Fabricate(:user) @user.confirm! sign_in @user end -
Bregor created this gist
Sep 25, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ module SpecHelpers def login_user(user = nil) @request.env["devise.mapping"] = Devise.mappings[:user] @request.env["omniauth.auth"] = Marshal.load(File.read("#{Rails.root}/spec/support/omniauth.auth")) @user = User.find_for_ldap_auth(@request.env['omniauth.auth']) # @user ||= Fabricate(:user) # @user.confirm! sign_in @user end end