diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-13 16:42:12 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-13 16:42:12 -0800 |
commit | 91d3d00240a2f75c74664580398628207bb7d350 (patch) | |
tree | 92a77e53010976991caa2aec055c97531a1bd3bc /activerecord/test/cases | |
parent | b8264ef0b43802dbd658d947e1c043254c900cf4 (diff) | |
download | rails-91d3d00240a2f75c74664580398628207bb7d350.tar.gz rails-91d3d00240a2f75c74664580398628207bb7d350.tar.bz2 rails-91d3d00240a2f75c74664580398628207bb7d350.zip |
fix tests for explain plan + binds
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/explain_test.rb | 4 | ||||
-rw-r--r-- | 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 @@ if ActiveRecord::Base.connection.supports_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 @@ class HotCompatibilityTest < ActiveRecord::TestCase end teardown do - @klass.connection.drop_table :hot_compatibilities + ActiveRecord::Base.connection.drop_table :hot_compatibilities end test "insert after remove_column" do |