diff options
author | Grzesiek Kolodziejczyk <gkolodziejczyk@gmail.com> | 2014-09-23 11:50:10 +0200 |
---|---|---|
committer | Grzesiek Kolodziejczyk <gkolodziejczyk@gmail.com> | 2014-09-23 11:50:10 +0200 |
commit | 95e3e42b87f3aea4552073cf370b696c28ea0caa (patch) | |
tree | 854e11b48df1aba1a128daf6ffaba50d095a29e2 | |
parent | 017294066fd7f54401d13db116f59655553e6b8c (diff) | |
download | rails-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
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb | 2 |
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 |