diff options
Diffstat (limited to 'spec/support/helpers/query_recorder.rb')
-rw-r--r-- | spec/support/helpers/query_recorder.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/helpers/query_recorder.rb b/spec/support/helpers/query_recorder.rb index d45377267f3..f77b43391dd 100644 --- a/spec/support/helpers/query_recorder.rb +++ b/spec/support/helpers/query_recorder.rb @@ -35,5 +35,9 @@ module ActiveRecord def log_message @log.join("\n\n") end + + def occurrences + @log.group_by(&:to_s).transform_values(&:count) + end end end |