diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2011-12-23 19:56:49 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2011-12-23 22:39:54 +0300 |
commit | 5f3b9dec0a03055824fa8187ef260e74d75a75eb (patch) | |
tree | 57974d254b85d614f911537c597cc7a65d304e24 /actionpack/lib/action_dispatch/testing | |
parent | a64ab959874681817c105f4cc6ce8b90b8bde545 (diff) | |
download | rails-5f3b9dec0a03055824fa8187ef260e74d75a75eb.tar.gz rails-5f3b9dec0a03055824fa8187ef260e74d75a75eb.tar.bz2 rails-5f3b9dec0a03055824fa8187ef260e74d75a75eb.zip |
remove Rails application fallback from AD::IntegrationTest
set AD::IntegrationTest.app in railtie initializer
Diffstat (limited to 'actionpack/lib/action_dispatch/testing')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 0f1bb9f260..26db8662a8 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -463,9 +463,12 @@ module ActionDispatch @@app = nil def self.app - # DEPRECATE Rails application fallback - # This should be set by the initializer - @@app || (defined?(Rails.application) && Rails.application) || nil + if !@@app && !ActionDispatch.test_app + ActiveSupport::Deprecation.warn "Rails application fallback is deprecated " \ + "and no longer works, please set ActionDispatch.test_app", caller + end + + @@app || ActionDispatch.test_app end def self.app=(app) |