Sha256: 2c7625625ac3560a602a3c73cb17e5930c8f73a17eb7534be54f0ba98f6d9f0c

Contents?: true

Size: 347 Bytes

Versions: 24

Compression:

Stored size: 347 Bytes

Contents

module AuthenticationHelper

  def sign_in_as(user)
    controller.stubs(:user_signed_in?).returns(true)
    controller.stubs(:current_user).returns(user)
    controller.stubs(:authenticate_user!).returns(true)
    session[:user_id] = user.id
  end

end

RSpec.configure do |config|
  config.include AuthenticationHelper, :type => :controller
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby spec/support/authentication_helper.rb
rearview-1.2.2.rc.2-jruby spec/support/authentication_helper.rb
rearview-1.2.2.rc.1-jruby spec/support/authentication_helper.rb
rearview-1.2.1-jruby spec/support/authentication_helper.rb
rearview-1.2.0-jruby spec/support/authentication_helper.rb
rearview-1.1.2-jruby spec/support/authentication_helper.rb
rearview-1.1.1-jruby spec/support/authentication_helper.rb
rearview-1.1.0-jruby spec/support/authentication_helper.rb
rearview-1.0.3.rc.4-jruby spec/support/authentication_helper.rb
rearview-1.0.3.rc.3-jruby spec/support/authentication_helper.rb
rearview-1.0.3.rc.2-jruby spec/support/authentication_helper.rb
rearview-1.0.3.rc.1-jruby spec/support/authentication_helper.rb
rearview-1.0.2-jruby spec/support/authentication_helper.rb
rearview-1.0.2.rc.4-jruby spec/support/authentication_helper.rb
rearview-1.0.2.rc.3-jruby spec/support/authentication_helper.rb
rearview-1.0.2.rc.2-jruby spec/support/authentication_helper.rb
rearview-1.0.2.rc.1-jruby spec/support/authentication_helper.rb
rearview-1.0.1-jruby spec/support/authentication_helper.rb
rearview-1.0.0-jruby spec/support/authentication_helper.rb
rearview-1.0.0.rc5-jruby spec/support/authentication_helper.rb