From 2e4a01b92ca2165442c130071bd19af52d14d7cf Mon Sep 17 00:00:00 2001 From: eileencodes Date: Mon, 9 Mar 2015 16:43:49 -0400 Subject: 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. --- actionpack/lib/action_dispatch/testing/integration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/testing/integration.rb') 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 -- cgit v1.2.3