Sha256: 18f9649ced31d7b1531d351148df706e675a598e8fe3f52a84823df36b42048b
Contents?: true
Size: 456 Bytes
Versions: 3
Compression:
Stored size: 456 Bytes
Contents
module Clearance module Testing module Helpers def sign_in_as(user) @controller.current_user = user return user end def sign_in sign_in_as FactoryGirl.create(:user) end def sign_out @controller.current_user = nil end def setup_controller_request_and_response super @request.env[:clearance] = Clearance::Session.new(@request.env) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
clearance-0.16.3 | lib/clearance/testing/helpers.rb |
clearance-0.16.2 | lib/clearance/testing/helpers.rb |
clearance-0.16.1 | lib/clearance/testing/helpers.rb |