diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-02-12 11:51:52 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-02-12 11:51:52 -0800 |
commit | fa63448420d3385dbd043aca22dba973b45b8bb2 (patch) | |
tree | 99f1d7486877d4a291e807203b1ad847da6a5d8d | |
parent | 0acd4a57768fc3c7e758f9f4b26563797f43e7ef (diff) | |
download | rails-fa63448420d3385dbd043aca22dba973b45b8bb2.tar.gz rails-fa63448420d3385dbd043aca22dba973b45b8bb2.tar.bz2 rails-fa63448420d3385dbd043aca22dba973b45b8bb2.zip |
use before_setup to set up test instance variables
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 13 |
1 files 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 |