aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2008-09-14 20:40:09 +0100
committerJeremy Kemper <jeremy@bitsweat.net>2008-09-14 18:57:39 -0700
commitf636c6fda037fbef25e98c81d019a6c600a18f66 (patch)
tree472357c512eafe2083ba6ad8355f71c1a4a293da
parentd51a39ff500d94ea4a81fbc22f0d1c540e83f4e1 (diff)
downloadrails-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.rb14
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