summaryrefslogtreecommitdiff
path: root/features/support/login_helpers.rb
blob: 540ff25a4f233f6bc266c085d3dbf6f54d5c5ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module LoginHelpers
  # After inclusion, IntegrationHelpers calls these two methods that aren't
  # supported by Spinach, so we perform the end results ourselves
  class << self
    def setup(*args)
      Spinach.hooks.before_scenario do
        Warden.test_mode!
      end
    end

    def teardown(*args)
      Spinach.hooks.after_scenario do
        Warden.test_reset!
      end
    end
  end

  include Devise::Test::IntegrationHelpers
end