Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed problem when fixture_path is not always defined (incidentally, …

…only when ActiveRecord is according to test_help.rb).
  • Loading branch information...
commit f0ee9e68891a6436946784d5a7e2124040bc14b4 1 parent 5088f8c
Philip Arndt parndt authored
4 railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb
View
@@ -10,4 +10,6 @@
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
# Load fixtures from the engine
-ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
+if ActiveSupport::TestCase.method_defined?(:fixture_path)

it should not be

if ActiveSupport::TestCase.method_defined?(:fixture_path=)

?

Piotr Sarnacki Collaborator
drogus added a note

I think that it will work because if fixture_path= is not available that is also true for fixture_path, but it's better to check for the version that's used, thanks for nooticing, fixed here: 919db1b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
+end
Gabriel Sobrinho

it should not be

if ActiveSupport::TestCase.method_defined?(:fixture_path=)

?

Piotr Sarnacki

I think that it will work because if fixture_path= is not available that is also true for fixture_path, but it's better to check for the version that's used, thanks for nooticing, fixed here: 919db1b

Please sign in to comment.
Something went wrong with that request. Please try again.