diff options
author | Peter Schröder <phoetmail@googlemail.com> | 2014-07-11 19:42:09 -0400 |
---|---|---|
committer | phoet <phoetmail@googlemail.com> | 2014-07-17 19:03:36 -0400 |
commit | 2e6b798c101cb130b34dab326be939be1b8815f1 (patch) | |
tree | 4258d88b333d19d23dbebcc5763e1359589f79d7 /activerecord/lib | |
parent | 5737c8e24b022556e5e03629b3249a033c5cee72 (diff) | |
download | rails-2e6b798c101cb130b34dab326be939be1b8815f1.tar.gz rails-2e6b798c101cb130b34dab326be939be1b8815f1.tar.bz2 rails-2e6b798c101cb130b34dab326be939be1b8815f1.zip |
don't log errors when all is fine
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 4306b36ae1..727f12103a 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -870,11 +870,11 @@ module ActiveRecord def try_to_load_dependency(file_name) require_dependency file_name rescue LoadError => e - # Let's hope the developer has included it - # Let's warn in case this is a subdependency, otherwise - # subdependency error messages are totally cryptic - if ActiveRecord::Base.logger - ActiveRecord::Base.logger.warn("Unable to load #{file_name}, underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}") + unless fixture_class_names.key?(file_name.pluralize) + if ActiveRecord::Base.logger + ActiveRecord::Base.logger.warn("Unable to load #{file_name}, make sure you added it to ActiveSupport::TestCase.set_fixture_class") + ActiveRecord::Base.logger.warn("underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}") + end end end |