From 91d3d00240a2f75c74664580398628207bb7d350 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 13 Jan 2014 16:42:12 -0800 Subject: [PATCH] fix tests for explain plan + binds --- activerecord/test/cases/explain_test.rb | 4 ++-- activerecord/test/cases/hot_compatibility_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/activerecord/test/cases/explain_test.rb b/activerecord/test/cases/explain_test.rb index 6dac5db111..9e7207d2f9 100644 --- a/activerecord/test/cases/explain_test.rb +++ b/activerecord/test/cases/explain_test.rb @@ -26,8 +26,8 @@ def test_collecting_queries_for_explain sql, binds = queries[0] assert_match "SELECT", sql - assert_match "honda", sql - assert_equal [], binds + assert_equal "honda", binds.flatten.last + assert_equal 1, binds.length end def test_exec_explain_with_no_binds diff --git a/activerecord/test/cases/hot_compatibility_test.rb b/activerecord/test/cases/hot_compatibility_test.rb index 367d04a154..b4617cf6f9 100644 --- a/activerecord/test/cases/hot_compatibility_test.rb +++ b/activerecord/test/cases/hot_compatibility_test.rb @@ -15,7 +15,7 @@ def self.name; 'HotCompatibility'; end end teardown do - @klass.connection.drop_table :hot_compatibilities + ActiveRecord::Base.connection.drop_table :hot_compatibilities end test "insert after remove_column" do -- GitLab