1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

some databases do not have bind params (mysql2) so take that in to account

This commit is contained in:
Aaron Patterson 2014-01-14 18:05:00 -08:00
parent 5e5118aa8b
commit 2c4c5231bb

View file

@ -26,8 +26,12 @@ if ActiveRecord::Base.connection.supports_explain?
sql, binds = queries[0]
assert_match "SELECT", sql
assert_equal "honda", binds.flatten.last
assert_equal 1, binds.length
if binds.any?
assert_equal 1, binds.length
assert_equal "honda", binds.flatten.last
else
assert_match 'honda', sql
end
end
def test_exec_explain_with_no_binds