diff options
Diffstat (limited to 'features/support')
-rw-r--r-- | features/support/login_helpers.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/features/support/login_helpers.rb b/features/support/login_helpers.rb new file mode 100644 index 00000000000..540ff25a4f2 --- /dev/null +++ b/features/support/login_helpers.rb @@ -0,0 +1,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 |