1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
Piotr Sarnacki 2010-09-02 12:09:16 +02:00
parent 6c906bf591
commit 9af189ac8f
2 changed files with 15 additions and 8 deletions

View file

@ -427,12 +427,6 @@ module Rails
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 @@ module Rails
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 file

@ -55,12 +55,19 @@ module RailtiesTest
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