aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/integration.rb
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2015-03-09 16:43:49 -0400
committereileencodes <eileencodes@gmail.com>2015-03-09 17:11:15 -0400
commit2e4a01b92ca2165442c130071bd19af52d14d7cf (patch)
treeb0e814b18ac0de0e259b602334a39fc4cb8d4b49 /actionpack/lib/action_dispatch/testing/integration.rb
parentd5e55e960c2919ad71ea645d219677457e9832eb (diff)
downloadrails-2e4a01b92ca2165442c130071bd19af52d14d7cf.tar.gz
rails-2e4a01b92ca2165442c130071bd19af52d14d7cf.tar.bz2
rails-2e4a01b92ca2165442c130071bd19af52d14d7cf.zip
Call super last in before_setup
This fixes the reasons 4cf3b8a, 303567e, and fa63448 needed to be reverted in 7142059. The revert has been reverted and this fixes the issues caused previously. If we call `super` first we will end up nuking the session settings in the application tests that do `setup do` - so any session login or cookie settings will not be persisted thoughout the test sessions. Calling `super` last prevents `@integration_session` from getting nuked and set to nil if it's already set. Test added to prevent regression of this behavior in the future.
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/integration.rb')
-rw-r--r--actionpack/lib/action_dispatch/testing/integration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb
index faf62fcd1d..9390e2937a 100644
--- a/actionpack/lib/action_dispatch/testing/integration.rb
+++ b/actionpack/lib/action_dispatch/testing/integration.rb
@@ -391,9 +391,9 @@ module ActionDispatch
attr_reader :app
def before_setup
- super
@app = nil
@integration_session = nil
+ super
end
def integration_session