From 95e3e42b87f3aea4552073cf370b696c28ea0caa Mon Sep 17 00:00:00 2001 From: Grzesiek Kolodziejczyk Date: Tue, 23 Sep 2014 11:50:10 +0200 Subject: Fix loading fixtures in engine tests fixture_path is a class attribute of ActiveSupport::TestCase, so ActiveSupport::TestCase.method_defined?(:fixture_path=) would always return false. This should fix #4971 --- .../lib/rails/generators/rails/plugin/templates/test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c6e2247e16..28cdfecf81 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 @@ -13,6 +13,6 @@ Rails.backtrace_cleaner.remove_silencers! Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } # Load fixtures from the engine -if ActiveSupport::TestCase.method_defined?(:fixture_path=) +if ActiveSupport::TestCase.respond_to?(:fixture_path=) ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) end -- cgit v1.2.3