scinote-web/spec/support/controller_macros.rb
2017-08-29 13:11:42 +02:00

10 lines
219 B
Ruby

module ControllerMacros
def login_user
before(:each) do
@request.env['devise.mapping'] = Devise.mappings[:user]
user = FactoryGirl.create(:user)
user.confirm
sign_in user
end
end
end