From a441293cd9824ea74bba9a98168d5bc88f379e4b Mon Sep 17 00:00:00 2001 From: masarakki Date: Mon, 13 Oct 2014 06:22:49 +0900 Subject: fix test_helper for mountable plugin --- .../lib/rails/generators/rails/plugin/templates/test/test_helper.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'railties/lib/rails/generators') diff --git a/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb index 28cdfecf81..d492e68357 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +++ b/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb @@ -4,6 +4,9 @@ ENV["RAILS_ENV"] = "test" 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" -- cgit v1.2.3