diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 6 | ||||
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 19 |
2 files changed, 5 insertions, 20 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index c6577d3d15..9a76b68ae1 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -717,7 +717,11 @@ module ActionDispatch module ClassMethods def app - @@app || ActionDispatch.test_app + if defined?(@@app) && @@app + @@app + else + ActionDispatch.test_app + end end def app=(app) diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 5a711ae150..3b89531e90 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -397,25 +397,6 @@ class IntegrationTestUsesCorrectClass < ActionDispatch::IntegrationTest end end -class IntegrationTestDefaultApp < ActionDispatch::IntegrationTest - def setup - @app = self.class.app - self.class.app = nil - - @test_app = ActionDispatch.test_app - ActionDispatch.test_app = 'fake_app' - end - - def teardown - self.class.app = @app - ActionDispatch.test_app = @test_app - end - - def test_class_app_returns_ad_test_app_by_default - assert_equal 'fake_app', self.class.app - end -end - class IntegrationProcessTest < ActionDispatch::IntegrationTest class IntegrationController < ActionController::Base def get |