From fa63448420d3385dbd043aca22dba973b45b8bb2 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 12 Feb 2015 11:51:52 -0800 Subject: use before_setup to set up test instance variables --- actionpack/lib/action_dispatch/testing/integration.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index f9ef8060a9..f6b6c57a83 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -389,8 +389,12 @@ module ActionDispatch APP_SESSIONS = {} - def app - @app ||= nil + attr_reader :app, :integration_session + + def before_setup + super + @app = nil + @integration_session = nil end # Reset the current session. This is useful for testing multiple sessions @@ -482,11 +486,6 @@ module ActionDispatch super end end - - private - def integration_session - @integration_session ||= nil - end end end -- cgit v1.2.3