# 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