aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/subscriber/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/subscriber/test_helper.rb')
-rw-r--r--railties/lib/rails/subscriber/test_helper.rb7
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.