aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorGrzesiek Kolodziejczyk <gkolodziejczyk@gmail.com>2014-09-23 11:50:10 +0200
committerGrzesiek Kolodziejczyk <gkolodziejczyk@gmail.com>2014-09-23 11:50:10 +0200
commit95e3e42b87f3aea4552073cf370b696c28ea0caa (patch)
tree854e11b48df1aba1a128daf6ffaba50d095a29e2 /railties/lib
parent017294066fd7f54401d13db116f59655553e6b8c (diff)
downloadrails-95e3e42b87f3aea4552073cf370b696c28ea0caa.tar.gz
rails-95e3e42b87f3aea4552073cf370b696c28ea0caa.tar.bz2
rails-95e3e42b87f3aea4552073cf370b696c28ea0caa.zip
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
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb2
1 files changed, 1 insertions, 1 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 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