Skip to content

Commit f1c61f7

Browse files
committed
Update query_assertions.rb
1 parent e8255d3 commit f1c61f7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/support/query_assertions.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ def assert_queries_count(count = nil, include_schema: false, &block)
1313
# Rails tests expect a save-point to be released at the end of the test. SQL Server does not release
1414
# save-points and so the number of queries will be off by one. This monkey patch adds a placeholder query
1515
# to the end of the queries array to account for the missing save-point release.
16-
if queries.any? { |query| query =~ /SAVE TRANSACTION \S+/ }
17-
queries.append "/* release savepoint placeholder for testing */"
18-
end
16+
queries.append "/* release savepoint placeholder for testing */" if queries.first =~ /SAVE TRANSACTION \S+/
1917
# End of monkey-patch
2018

2119
if count

0 commit comments

Comments
 (0)