Permalink
Browse files

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

…count
  • Loading branch information...
1 parent 5e5118a commit 2c4c5231bbcd3ee3ab2e2426ec3ffd3603581bdb @tenderlove tenderlove committed Jan 15, 2014
Showing with 6 additions and 2 deletions.
  1. +6 −2 activerecord/test/cases/explain_test.rb
View
8 activerecord/test/cases/explain_test.rb
@@ -26,8 +26,12 @@ def test_collecting_queries_for_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

0 comments on commit 2c4c523

Please sign in to comment.