Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
fcheung authored and jeremy committed Sep 15, 2008
1 parent d51a39f commit f636c6f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions activerecord/test/cases/helper.rb
Expand Up @@ -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

0 comments on commit f636c6f

Please sign in to comment.