aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-07-17 17:19:56 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-07-17 17:33:32 +0900
commita0ebab52b2a708a09739e0c4ecc16ad16d4e676d (patch)
tree05fd4ba84c0a6ce986ea9766fcb12b1e2b211bb9 /activerecord/test/cases
parentfbade51248ea48db87703ba7418badbd3ed85e36 (diff)
downloadrails-a0ebab52b2a708a09739e0c4ecc16ad16d4e676d.tar.gz
rails-a0ebab52b2a708a09739e0c4ecc16ad16d4e676d.tar.bz2
rails-a0ebab52b2a708a09739e0c4ecc16ad16d4e676d.zip
Remove useless `arel_engine`
`arel_engine` is only used in `raise_record_not_found_exception!` to use `engine.connection` (and `connection.visitor`) in `arel.where_sql`. https://github.com/rails/arel/blob/v8.0.0/lib/arel/select_manager.rb#L183 But `klass.connection` will work as expected even if not using `arel_engine` (described by `test_connection`). So `arel_engine` is no longer needed.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/multiple_db_test.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/activerecord/test/cases/multiple_db_test.rb b/activerecord/test/cases/multiple_db_test.rb
index e3bb51bd77..4e3daeabb6 100644
--- a/activerecord/test/cases/multiple_db_test.rb
+++ b/activerecord/test/cases/multiple_db_test.rb
@@ -90,14 +90,9 @@ class MultipleDbTest < ActiveRecord::TestCase
assert_equal "Ruby Developer", Entrant.find(1).name
end
- def test_arel_table_engines
- assert_not_equal Entrant.arel_engine, Bird.arel_engine
- assert_not_equal Entrant.arel_engine, Course.arel_engine
- end
-
def test_connection
- assert_equal Entrant.arel_engine.connection.object_id, Bird.arel_engine.connection.object_id
- assert_not_equal Entrant.arel_engine.connection.object_id, Course.arel_engine.connection.object_id
+ assert_same Entrant.connection, Bird.connection
+ assert_not_same Entrant.connection, Course.connection
end
unless in_memory_db?