diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 13 | ||||
-rw-r--r-- | railties/test/railties/engine_test.rb | 8 |
2 files changed, 10 insertions, 11 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 2da695b78e..63d53fff90 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -26,18 +26,17 @@ module ApplicationTests FileUtils.rm_rf(new_app) if File.directory?(new_app) end - test "Rails::Application.instance is nil until app is initialized" do + test "Rails.application is nil until app is initialized" do require 'rails' - assert_nil Rails::Application.instance + assert_nil Rails.application require "#{app_path}/config/environment" - assert_equal AppTemplate::Application.instance, Rails::Application.instance + assert_equal AppTemplate::Application.instance, Rails.application end - test "Rails::Application responds to all instance methods" do + test "Rails.application responds to all instance methods" do require "#{app_path}/config/environment" - assert_respond_to Rails::Application, :routes_reloader - assert_equal Rails::Application.routes_reloader, Rails.application.routes_reloader - assert_equal Rails::Application.routes_reloader, AppTemplate::Application.routes_reloader + assert_respond_to Rails.application, :routes_reloader + assert_equal Rails.application.routes_reloader, AppTemplate::Application.routes_reloader end test "Rails::Application responds to paths" do diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 09f2b5baa0..e8675daef0 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -85,12 +85,12 @@ module RailtiesTest boot_rails - Rails::Application.routes.draw do |map| + Rails.application.routes.draw do |map| mount(Bukkits::Engine => "/bukkits") end env = Rack::MockRequest.env_for("/bukkits") - response = Rails::Application.call(env) + response = Rails.application.call(env) assert_equal "HELLO WORLD", response[2] end @@ -109,12 +109,12 @@ module RailtiesTest match "/foo" => lambda { |env| [200, {'Content-Type' => 'text/html'}, 'foo'] } end - Rails::Application.routes.draw do |map| + Rails.application.routes.draw do |map| mount(Bukkits::Engine => "/bukkits") end env = Rack::MockRequest.env_for("/bukkits/foo") - response = Rails::Application.call(env) + response = Rails.application.call(env) assert_equal "foo", response[2] end |