mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Print the queries that were executed if assert_queries fails
This commit is contained in:
parent
bb557b44e9
commit
3dfecfe773
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ module ActiveRecord
|
|||
$queries_executed = []
|
||||
yield
|
||||
ensure
|
||||
assert_equal num, $queries_executed.size, "#{$queries_executed.size} instead of #{num} queries were executed."
|
||||
assert_equal num, $queries_executed.size, "#{$queries_executed.size} instead of #{num} queries were executed.#{$queries_executed.size == 0 ? '' : "\nQueries:\n#{$queries_executed.join("\n")}"}"
|
||||
end
|
||||
|
||||
def assert_no_queries(&block)
|
||||
|
|
Loading…
Reference in a new issue