diff options
author | Yukio Mizuta <untidyhair@gmail.com> | 2014-09-16 19:42:04 -0700 |
---|---|---|
committer | Yukio Mizuta <untidyhair@gmail.com> | 2014-09-16 20:21:17 -0700 |
commit | 7137c6b7750ca5d1ddcc794de5e9b219af65de1c (patch) | |
tree | 926a199e3ee1d15459ee03bade98baccea452c41 /railties/lib/rails | |
parent | de33fe7d7e25945eeafcd8577438aba4721c804e (diff) | |
download | rails-7137c6b7750ca5d1ddcc794de5e9b219af65de1c.tar.gz rails-7137c6b7750ca5d1ddcc794de5e9b219af65de1c.tar.bz2 rails-7137c6b7750ca5d1ddcc794de5e9b219af65de1c.zip |
Specify dummy app's db migrate path in plugin's test_helper.rb
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 40c83d063a..c6e2247e16 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 @@ -2,6 +2,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__)] +<% end -%> require "rails/test_help" Rails.backtrace_cleaner.remove_silencers! |