From 5088f8ce069f9b2cb2581a7eb286133c19abf302 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Tue, 13 Mar 2012 23:27:50 +1300 Subject: Fixes issue #5193 using the instructions provided in the issue. --- .../rails/generators/rails/plugin_new/templates/test/test_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb index dcd3b276e3..260011c8fd 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb +++ b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb @@ -8,3 +8,6 @@ Rails.backtrace_cleaner.remove_silencers! # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } + +# Load fixtures from the engine +ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) \ No newline at end of file -- cgit v1.2.3 From f0ee9e68891a6436946784d5a7e2124040bc14b4 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Tue, 13 Mar 2012 23:28:42 +1300 Subject: Fixed problem when fixture_path is not always defined (incidentally, only when ActiveRecord is according to test_help.rb). --- .../rails/generators/rails/plugin_new/templates/test/test_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb index 260011c8fd..8d45b2bbd9 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb +++ b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb @@ -10,4 +10,6 @@ Rails.backtrace_cleaner.remove_silencers! Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } # Load fixtures from the engine -ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) \ No newline at end of file +if ActiveSupport::TestCase.method_defined?(:fixture_path) + ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) +end \ No newline at end of file -- cgit v1.2.3