diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-13 10:33:13 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-13 10:33:13 -0300 |
commit | f919d5f5ea75f0e56a57643e5a0472367a98625f (patch) | |
tree | 14a5a67e70809b7c3f4e30e6d059fde8c6e792c5 /railties/lib/rails/generators | |
parent | c0c5f30d41627f1d077b8ccf7ab32134c6702ccf (diff) | |
parent | a441293cd9824ea74bba9a98168d5bc88f379e4b (diff) | |
download | rails-f919d5f5ea75f0e56a57643e5a0472367a98625f.tar.gz rails-f919d5f5ea75f0e56a57643e5a0472367a98625f.tar.bz2 rails-f919d5f5ea75f0e56a57643e5a0472367a98625f.zip |
Merge pull request #17240 from masarakki/fix-test_helper-of-mountable-plugin
fix test_helper for mountable plugin
Diffstat (limited to 'railties/lib/rails/generators')
-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" |