Sha256: 29a28f8f45f5bfe46f7981f7df6677b14c8c372982508ec42fcb903b630c2efd

Contents?: true

Size: 230 Bytes

Versions: 1

Compression:

Stored size: 230 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
releaf-2.0.0 spec/support/controller_macros.rb