Sha256: 4d9206ff5186919b1b30e18882012c47ffc60277b3e23be9a58e88caa99f5171

Contents?: true

Size: 231 Bytes

Versions: 32

Compression:

Stored size: 231 Bytes

Contents

module ControllerMacros
  def login_as_user factory
    before(:each) do
      @request.env["devise.mapping"] = Devise.mappings[:admin]
      sign_in FactoryGirl.create(factory) # Using factory girl as an example
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
releaf-1.1.22 spec/support/controller_macros.rb
releaf-1.1.21 spec/support/controller_macros.rb
releaf-1.1.20 spec/support/controller_macros.rb
releaf-1.1.19 spec/support/controller_macros.rb
releaf-1.1.18 spec/support/controller_macros.rb
releaf-1.1.17 spec/support/controller_macros.rb
releaf-1.1.16 spec/support/controller_macros.rb
releaf-1.1.15 spec/support/controller_macros.rb
releaf-1.1.14 spec/support/controller_macros.rb
releaf-1.1.13 spec/support/controller_macros.rb
releaf-1.1.12 spec/support/controller_macros.rb
releaf-1.1.11 spec/support/controller_macros.rb
releaf-1.1.10 spec/support/controller_macros.rb
releaf-1.1.9 spec/support/controller_macros.rb
releaf-1.1.8 spec/support/controller_macros.rb
releaf-1.1.7 spec/support/controller_macros.rb
releaf-1.1.6 spec/support/controller_macros.rb
releaf-1.1.5 spec/support/controller_macros.rb
releaf-1.1.4 spec/support/controller_macros.rb
releaf-1.1.3 spec/support/controller_macros.rb