Sha256: 293b221e3187f2f659be4994a55ada818c5e441f62d3efd9b4ed9f016b7cf751

Contents?: true

Size: 687 Bytes

Versions: 20

Compression:

Stored size: 687 Bytes

Contents

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

    def login_refinery_user
      before (:each) do
        @refinery_user = Factory(:refinery_user)
        @request.env["devise.mapping"] = Devise.mappings[:admin]
        sign_in @refinery_user
      end
    end

    def login_refinery_translator
      before (:each) do
        @refinery_translator = Factory(:refinery_translator)
        @request.env["devise.mapping"] = Devise.mappings[:admin]
        sign_in @refinery_translator
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
refinerycms-1.0.11 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.11 spec/support/refinery/controller_macros.rb
refinerycms-1.0.10 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.10 spec/support/refinery/controller_macros.rb
refinerycms-1.0.9 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.9 spec/support/refinery/controller_macros.rb
refinerycms-1.0.8 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.8 spec/support/refinery/controller_macros.rb
refinerycms-1.0.7 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.7 spec/support/refinery/controller_macros.rb
refinerycms-1.0.5 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.5 spec/support/refinery/controller_macros.rb
refinerycms-1.0.4 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.4 spec/support/refinery/controller_macros.rb
refinerycms-1.0.3 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.3 spec/support/refinery/controller_macros.rb
refinerycms-1.0.1 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.1 spec/support/refinery/controller_macros.rb
refinerycms-1.0.0 spec/support/refinery/controller_macros.rb
refinerycms-testing-1.0.0 spec/support/refinery/controller_macros.rb