Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

stop AR's debug.log filling with warnings about not being able to loa…

…d fixture classes

[#1045 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit f636c6fda037fbef25e98c81d019a6c600a18f66 1 parent d51a39f
@fcheung fcheung authored jeremy committed
Showing with 14 additions and 0 deletions.
  1. +14 −0 activerecord/test/cases/helper.rb
View
14 activerecord/test/cases/helper.rb
@@ -46,3 +46,17 @@ def execute_with_query_record(sql, name = nil, &block)
class << ActiveRecord::Base
public :with_scope, :with_exclusive_scope
end
+
+unless ENV['FIXTURE_DEBUG']
+ module Test #:nodoc:
+ module Unit #:nodoc:
+ class << TestCase #:nodoc:
+ def try_to_load_dependency_with_silence(*args)
+ ActiveRecord::Base.logger.silence { try_to_load_dependency_without_silence(*args)}
+ end
+
+ alias_method_chain :try_to_load_dependency, :silence
+ end
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.