Sha256: 6f6026c1d825e656bd76e09264aebaa1f7469ba9e09ea736761ac545afb45323

Contents?: true

Size: 241 Bytes

Versions: 24

Compression:

Stored size: 241 Bytes

Contents

module ControllerMacros
  def access_anonymous
    sign_out :user
    User.new
  end

  def login_user(user)
    @request ||= controller.request
    @request.env['devise.mapping'] = Devise.mappings[:user]
    sign_in user
    user
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
message_train-0.7.6 spec/support/controller_macros.rb
message_train-0.7.5 spec/support/controller_macros.rb
message_train-0.7.3 spec/support/controller_macros.rb
message_train-0.7.2 spec/support/controller_macros.rb
message_train-0.7.1 spec/support/controller_macros.rb
message_train-0.6.17 spec/support/controller_macros.rb
message_train-0.6.16 spec/support/controller_macros.rb
message_train-0.6.15 spec/support/controller_macros.rb
message_train-0.6.14 spec/support/controller_macros.rb
message_train-0.6.13 spec/support/controller_macros.rb
message_train-0.6.12 spec/support/controller_macros.rb
message_train-0.6.11 spec/support/controller_macros.rb
message_train-0.6.10 spec/support/controller_macros.rb
message_train-0.6.9 spec/support/controller_macros.rb
message_train-0.6.8 spec/support/controller_macros.rb
message_train-0.6.7 spec/support/controller_macros.rb
message_train-0.6.6 spec/support/controller_macros.rb
message_train-0.6.5 spec/support/controller_macros.rb
message_train-0.6.4 spec/support/controller_macros.rb
message_train-0.6.3 spec/support/controller_macros.rb