Created
November 18, 2011 08:38
Revisions
-
krasio revised this gist
Nov 18, 2011 . 1 changed file with 3 additions and 3 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 @@ -4,9 +4,9 @@ def sign_in_user let(:current_user) { Factory.stub(:user) } before do sign_in current_user warden.stub(:authenticate => current_user) warden.stub(:authenticate! => current_user) end end end -
krasio created this gist
Nov 18, 2011 .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 @@ # spec/support/macros/authentication_macros.rb module AuthenticationMacros def sign_in_user let(:current_user) { Factory.stub(:user) } before do sign_in current_user warden.stub(:authenticate => current_user) warden.stub(:authenticate! => current_user) end end end 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,5 @@ # spec/support/configuration.rb RSpec.configure do |config| config.include Devise::TestHelpers, :type => :controller config.extend AuthenticationMacros, :type => :controller end