From f636c6fda037fbef25e98c81d019a6c600a18f66 Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Sun, 14 Sep 2008 20:40:09 +0100 Subject: stop AR's debug.log filling with warnings about not being able to load fixture classes [#1045 state:committed] Signed-off-by: Jeremy Kemper --- activerecord/test/cases/helper.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'activerecord/test/cases/helper.rb') diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index f30d58546e..f7bdac8013 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -46,3 +46,17 @@ end 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 \ No newline at end of file -- cgit v1.2.3