diff options
-rw-r--r-- | railties/lib/rails/application.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/application/routes_reloader.rb | 5 | ||||
-rw-r--r-- | railties/test/application/routing_test.rb | 2 | ||||
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 2 |
4 files changed, 4 insertions, 8 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 1680a6ed00..c7b19c964a 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -66,9 +66,10 @@ module Rails end end - attr_accessor :assets, :sandbox, :queue + attr_accessor :assets, :sandbox alias_method :sandbox?, :sandbox attr_reader :reloaders + attr_writer :queue delegate :default_url_options, :default_url_options=, :to => :routes diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb index 7f9190b01a..19f616ec50 100644 --- a/railties/lib/rails/application/routes_reloader.rb +++ b/railties/lib/rails/application/routes_reloader.rb @@ -24,12 +24,11 @@ module Rails def updater @updater ||= begin - dirs = @external_routes.inject({}) do |hash, dir| - hash.merge(dir.to_s => ["rb"]) + dirs = @external_routes.each_with_object({}) do |dir, hash| + hash[dir.to_s] = %w(rb) end updater = ActiveSupport::FileUpdateChecker.new(paths, dirs) { reload! } - updater.execute updater end diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb index 4560dcec69..977a5fc7e8 100644 --- a/railties/test/application/routing_test.rb +++ b/railties/test/application/routing_test.rb @@ -249,9 +249,7 @@ module ApplicationTests assert_equal 404, last_response.status end end - end - {"development" => "baz", "production" => "bar"}.each do |mode, expected| test "reloads routes when configuration is changed in #{mode}" do controller :foo, <<-RUBY class FooController < ApplicationController diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 7957186ba2..f2dc0c71b1 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -18,7 +18,6 @@ RAILS_FRAMEWORK_ROOT = File.expand_path("#{File.dirname(__FILE__)}/../../..") # These files do not require any others and are needed # to run the tests require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/testing/isolation" -require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/testing/declarative" require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/core_ext/kernel/reporting" module TestHelpers @@ -268,7 +267,6 @@ class ActiveSupport::TestCase include TestHelpers::Paths include TestHelpers::Rack include TestHelpers::Generation - extend ActiveSupport::Testing::Declarative end # Create a scope and build a fixture rails app |