From 598e7c9e2004b85146386571372423020ba7c52a Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Thu, 5 May 2016 15:25:08 -0500 Subject: s/specification_id/specification_name --- .../cases/connection_adapters/connection_handler_test.rb | 14 +++++++------- .../test/cases/connection_specification/resolver_test.rb | 8 ++++---- activerecord/test/cases/multiple_db_test.rb | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb index 47e8486ded..fc5ca8865b 100644 --- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb +++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb @@ -6,11 +6,11 @@ module ActiveRecord def setup @handler = ConnectionHandler.new resolver = ConnectionAdapters::ConnectionSpecification::Resolver.new Base.configurations - @spec_id = "primary" - @pool = @handler.establish_connection(resolver.spec(:arunit, @spec_id)) + @spec_name = "primary" + @pool = @handler.establish_connection(resolver.spec(:arunit, @spec_name)) end - def test_establish_connection_uses_spec_id + def test_establish_connection_uses_spec_name config = {"readonly" => {"adapter" => 'sqlite3'}} resolver = ConnectionAdapters::ConnectionSpecification::Resolver.new(config) spec = resolver.spec(:readonly) @@ -22,19 +22,19 @@ module ActiveRecord end def test_retrieve_connection - assert @handler.retrieve_connection(@spec_id) + assert @handler.retrieve_connection(@spec_name) end def test_active_connections? assert !@handler.active_connections? - assert @handler.retrieve_connection(@spec_id) + assert @handler.retrieve_connection(@spec_name) assert @handler.active_connections? @handler.clear_active_connections! assert !@handler.active_connections? end def test_retrieve_connection_pool - assert_not_nil @handler.retrieve_connection_pool(@spec_id) + assert_not_nil @handler.retrieve_connection_pool(@spec_name) end def test_retrieve_connection_pool_with_invalid_id @@ -77,7 +77,7 @@ module ActiveRecord pid = fork { rd.close - pool = @handler.retrieve_connection_pool(@spec_id) + pool = @handler.retrieve_connection_pool(@spec_name) wr.write Marshal.dump pool.schema_cache.size wr.close exit! diff --git a/activerecord/test/cases/connection_specification/resolver_test.rb b/activerecord/test/cases/connection_specification/resolver_test.rb index 36d1e059c7..3bddaf32ec 100644 --- a/activerecord/test/cases/connection_specification/resolver_test.rb +++ b/activerecord/test/cases/connection_specification/resolver_test.rb @@ -116,14 +116,14 @@ module ActiveRecord "encoding" => "utf8" }, spec) end - def test_spec_id_on_key_lookup + def test_spec_name_on_key_lookup spec = spec(:readonly, 'readonly' => {'adapter' => 'sqlite3'}) - assert_equal "readonly", spec.id + assert_equal "readonly", spec.name end - def test_spec_id_with_inline_config + def test_spec_name_with_inline_config spec = spec({'adapter' => 'sqlite3'}) - assert_equal "primary", spec.id, "should default to primary id" + assert_equal "primary", spec.name, "should default to primary id" end end end diff --git a/activerecord/test/cases/multiple_db_test.rb b/activerecord/test/cases/multiple_db_test.rb index b7fc8710ca..2838315bca 100644 --- a/activerecord/test/cases/multiple_db_test.rb +++ b/activerecord/test/cases/multiple_db_test.rb @@ -25,10 +25,10 @@ class MultipleDbTest < ActiveRecord::TestCase end def test_swapping_the_connection - old_spec_id, Course.specification_id = Course.specification_id, "primary" + old_spec_name, Course.specification_name = Course.specification_name, "primary" assert_equal(Entrant.connection, Course.connection) ensure - Course.specification_id = old_spec_id + Course.specification_name = old_spec_name end def test_find -- cgit v1.2.3