From 7137c6b7750ca5d1ddcc794de5e9b219af65de1c Mon Sep 17 00:00:00 2001 From: Yukio Mizuta Date: Tue, 16 Sep 2014 19:42:04 -0700 Subject: Specify dummy app's db migrate path in plugin's test_helper.rb --- .../lib/rails/generators/rails/plugin/templates/test/test_helper.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'railties/lib') 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! -- cgit v1.2.3