Sha256: b65ea21dd114ab397caef74d6b13ae8c5979e71a49eeda831202386b66fd56e9

Contents?: true

Size: 557 Bytes

Versions: 90

Compression:

Stored size: 557 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[:librarian]
      @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

90 entries across 90 versions & 3 rubygems

Version Path
enju_ndl-0.3.3 spec/support/controller_macros.rb
enju_nii-0.3.2 spec/support/controller_macros.rb
enju_loc-0.3.1 spec/support/controller_macros.rb
enju_nii-0.3.1 spec/support/controller_macros.rb
enju_ndl-0.3.2 spec/support/controller_macros.rb
enju_ndl-0.4.0.rc.1 spec/support/controller_macros.rb
enju_nii-0.4.0.beta.1 spec/support/controller_macros.rb
enju_ndl-0.4.0.beta.1 spec/support/controller_macros.rb
enju_ndl-0.3.1 spec/support/controller_macros.rb
enju_loc-0.3.0 spec/support/controller_macros.rb
enju_nii-0.3.0 spec/support/controller_macros.rb
enju_ndl-0.3.0 spec/support/controller_macros.rb
enju_ndl-0.3.0.rc.1 spec/support/controller_macros.rb
enju_loc-0.3.0.beta.1 spec/support/controller_macros.rb
enju_nii-0.3.0.beta.1 spec/support/controller_macros.rb
enju_ndl-0.3.0.beta.1 spec/support/controller_macros.rb
enju_nii-0.2.1 spec/support/controller_macros.rb
enju_ndl-0.2.3 spec/support/controller_macros.rb
enju_ndl-0.2.2 spec/support/controller_macros.rb
enju_ndl-0.2.1 spec/support/controller_macros.rb