diff options
author | Frederick Cheung <frederick.cheung@gmail.com> | 2008-09-14 20:40:09 +0100 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-14 18:57:39 -0700 |
commit | f636c6fda037fbef25e98c81d019a6c600a18f66 (patch) | |
tree | 472357c512eafe2083ba6ad8355f71c1a4a293da | |
parent | d51a39ff500d94ea4a81fbc22f0d1c540e83f4e1 (diff) | |
download | rails-f636c6fda037fbef25e98c81d019a6c600a18f66.tar.gz rails-f636c6fda037fbef25e98c81d019a6c600a18f66.tar.bz2 rails-f636c6fda037fbef25e98c81d019a6c600a18f66.zip |
stop AR's debug.log filling with warnings about not being able to load fixture classes
[#1045 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
-rw-r--r-- | activerecord/test/cases/helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
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 |