diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-03-29 23:46:13 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-04-20 01:55:36 +0300 |
commit | 40ba2f7d207a16376908ea0f6db6699808aa29e2 (patch) | |
tree | ffae34b50f185e0ea215e185c003f66b82dfadb3 /features/support | |
parent | 4ef0c6888b7035c1dc6ef8f9ecfa5dfb63884b98 (diff) |
Except where necessary, use `sign_in` over `login_as` in features
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 |