diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-14 22:03:47 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-15 12:24:31 +0100 |
commit | b4019d5080181a911f8652cabd184794963911b6 (patch) | |
tree | e9b63bc2ee365b616bd51d1472f447f7b7dcd324 /railties/lib/rails/subscriber | |
parent | 8b9bff95579498a0389d7634cafbcee37787c15f (diff) | |
download | rails-b4019d5080181a911f8652cabd184794963911b6.tar.gz rails-b4019d5080181a911f8652cabd184794963911b6.tar.bz2 rails-b4019d5080181a911f8652cabd184794963911b6.zip |
Rails::Subscriber is now responsible for flushing all loggers it's responsible for.
Diffstat (limited to 'railties/lib/rails/subscriber')
-rw-r--r-- | railties/lib/rails/subscriber/test_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/lib/rails/subscriber/test_helper.rb b/railties/lib/rails/subscriber/test_helper.rb index 8b981dc3a6..1464767ed9 100644 --- a/railties/lib/rails/subscriber/test_helper.rb +++ b/railties/lib/rails/subscriber/test_helper.rb @@ -58,7 +58,10 @@ module Rails end class MockLogger + attr_reader :flush_count + def initialize + @flush_count = 0 @logged = Hash.new { |h,k| h[k] = [] } end @@ -69,6 +72,10 @@ module Rails def logged(level) @logged[level].compact.map { |l| l.to_s.strip } end + + def flush + @flush_count += 1 + end end # Wait notifications to be published. |