diff options
author | masarakki <masaki@hisme.net> | 2014-10-13 06:22:49 +0900 |
---|---|---|
committer | masarakki <masaki@hisme.net> | 2014-10-13 22:17:50 +0900 |
commit | a441293cd9824ea74bba9a98168d5bc88f379e4b (patch) | |
tree | 65da466bcf0f180976699417abe331cc8fc8cdcf /railties/lib/rails | |
parent | 51278579477eb7ee20fe2aba53b4b13203791b22 (diff) | |
download | rails-a441293cd9824ea74bba9a98168d5bc88f379e4b.tar.gz rails-a441293cd9824ea74bba9a98168d5bc88f379e4b.tar.bz2 rails-a441293cd9824ea74bba9a98168d5bc88f379e4b.zip |
fix test_helper for mountable plugin
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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" |