Sha256: a03aeb17ac7a50abb07ad3b191c3e518f771493bc277363dc1ea3083b5ac1cd5

Contents?: true

Size: 552 Bytes

Versions: 11

Compression:

Stored size: 552 Bytes

Contents

module ControllerMacros
  def login_fixture_admin
    before(:each) do
      @request.env["devise.mapping"] = Devise.mappings[:admin]
      @user = users(:admin)
      sign_in @user
    end
  end

  def login_fixture_librarian
    before(:each) do
      @request.env["devise.mapping"] = Devise.mappings[:user]
      @user = users(:librarian1)
      sign_in @user
    end
  end

  def login_fixture_user
    before(:each) do
      @request.env["devise.mapping"] = Devise.mappings[:user]
      @user = users(:user1)
      sign_in @user
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
enju_export-0.1.1.pre6 spec/support/controller_macros.rb
enju_export-0.1.1.pre5 spec/support/controller_macros.rb
enju_export-0.1.1.pre4 spec/support/controller_macros.rb
enju_export-0.1.1.pre3 spec/support/controller_macros.rb
enju_export-0.1.1.pre2 spec/support/controller_macros.rb
enju_export-0.1.1.pre spec/support/controller_macros.rb
enju_export-0.1.0.pre spec/support/controller_macros.rb
enju_export-0.1.0 spec/support/controller_macros.rb
enju_export-0.0.3 spec/support/controller_macros.rb
enju_export-0.0.2 spec/support/controller_macros.rb
enju_export-0.0.1 spec/support/controller_macros.rb