Sha256: 0b0efb30895d6e2303bacbbf938744204f181802ddeea824a32ceaee0b2ee13e

Contents?: true

Size: 378 Bytes

Versions: 2

Compression:

Stored size: 378 Bytes

Contents

require 'authenticate/controller'

module Controllers
  module ControllerHelpers

    def sign_in
      user = create(:user)
      sign_in_as user
    end

    def sign_in_as(user)
      controller.login user
    end

    def sign_out
      controller.logout
    end

  end
end

RSpec.configure do |config|
  config.include Controllers::ControllerHelpers, type: :controller
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
authenticate-0.3.1 spec/support/controllers/controller_helpers.rb
authenticate-0.3.0 spec/support/controllers/controller_helpers.rb