提交 a441293c 编写于 作者: M masarakki

fix test_helper for mountable plugin

上级 51278579
......@@ -4,6 +4,9 @@
require File.expand_path("../../<%= options[:dummy_path] -%>/config/environment.rb", __FILE__)
<% unless options[:skip_active_record] -%>
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../<%= options[:dummy_path] -%>/db/migrate", __FILE__)]
<% if options[:mountable] -%>
ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
<% end -%>
<% end -%>
require "rails/test_help"
......
......@@ -245,6 +245,10 @@ def test_create_mountable_application_with_mountable_option
assert_match(/stylesheet_link_tag\s+['"]bukkits\/application['"]/, contents)
assert_match(/javascript_include_tag\s+['"]bukkits\/application['"]/, contents)
end
assert_file "test/test_helper.rb" do |content|
assert_match(/ActiveRecord::Migrator\.migrations_paths.+\.\.\/test\/dummy\/db\/migrate/, content)
assert_match(/ActiveRecord::Migrator\.migrations_paths.+<<.+\.\.\/db\/migrate/, content)
end
end
def test_creating_gemspec
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册