From 25c2bde7117241226d6e140e3a036c707f9ed14a Mon Sep 17 00:00:00 2001 From: Sam Phippen Date: Sun, 21 Aug 2016 14:08:59 +0100 Subject: Move setting of integration session to constructor. This allows us to not `||=` in `before_setup`. --- actionpack/lib/action_dispatch/testing/integration.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 8ab490642e..f5ec28a9c2 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -420,9 +420,13 @@ module ActionDispatch attr_reader :app + def initialize(*args, &blk) + super(*args, &blk) + @integration_session = nil + end + def before_setup # :nodoc: @app = nil - @integration_session ||= nil super end -- cgit v1.2.3