Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

I've changed that test along the way, it should actually stay without…

… changes
  • Loading branch information...
commit 9af189ac8fde1988b9695cf1459b04c9a8a042ee 1 parent 6c906bf
@drogus drogus authored
View
12 railties/lib/rails/engine.rb
@@ -427,12 +427,6 @@ def config
end
end
- initializer :load_config_initializers do
- paths.config.initializers.to_a.sort.each do |initializer|
- load(initializer)
- end
- end
-
initializer :load_environment_config, :before => :load_environment_hook do
environment = config.paths.config.environments.to_a.first
require environment if environment
@@ -454,6 +448,12 @@ def config
end
end
+ initializer :load_config_initializers do
+ paths.config.initializers.to_a.sort.each do |initializer|
+ load(initializer)
+ end
+ end
+
initializer :engines_blank_point do
# We need this initializer so all extra initializers added in engines are
# consistently executed after all the initializers above across all engines.
View
11 railties/test/railties/engine_test.rb
@@ -55,12 +55,19 @@ class Engine < ::Rails::Engine
initializers = Rails.application.initializers.tsort
index = initializers.index { |i| i.name == "dummy_initializer" }
+ selection = initializers[(index-3)..(index)].map(&:name).map(&:to_s)
+
+ assert_equal %w(
+ load_config_initializers
+ load_config_initializers
+ engines_blank_point
+ dummy_initializer
+ ), selection
- assert index > initializers.index { |i| i.name == :load_config_initializers }
- assert index > initializers.index { |i| i.name == :engines_blank_point }
assert index < initializers.index { |i| i.name == :build_middleware_stack }
end
+
class Upcaser
def initialize(app)
@app = app
Please sign in to comment.
Something went wrong with that request. Please try again.