提交 2d1f9fb9 编写于 作者: J Joshua Peek

Plugins need to load before app initializers

上级 3b6f659f
......@@ -91,8 +91,8 @@ def call(env)
def initializers
initializers = Bootstrap.initializers
initializers += super
railties.all { |r| initializers += r.initializers }
initializers += super
initializers += Finisher.initializers
initializers
end
......
......@@ -37,6 +37,19 @@ def app
assert_equal "Bukkits", Bukkits.name
end
test "plugin init is ran before application initializers" do
plugin "foo", "$foo = true" do |plugin|
plugin.write "lib/foo.rb", "module Foo; end"
end
app_file 'config/initializers/foo.rb', <<-RUBY
raise "no $foo" unless $foo
raise "no Foo" unless Foo
RUBY
boot_rails
end
test "plugin paths get added to the AS::Dependency list" do
boot_rails
assert_equal "Bukkits", Bukkits.name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册