aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2016-05-05 15:25:08 -0500
committerArthur Neves <arthurnn@gmail.com>2016-05-05 15:39:27 -0500
commit598e7c9e2004b85146386571372423020ba7c52a (patch)
treed9749f43554c60008fe0fb3888c332356d0ef781 /activerecord/test
parent34856ba9fa893bd1483ca5b08b65562cd5c02c58 (diff)
downloadrails-598e7c9e2004b85146386571372423020ba7c52a.tar.gz
rails-598e7c9e2004b85146386571372423020ba7c52a.tar.bz2
rails-598e7c9e2004b85146386571372423020ba7c52a.zip
s/specification_id/specification_name
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/connection_adapters/connection_handler_test.rb14
-rw-r--r--activerecord/test/cases/connection_specification/resolver_test.rb8
-rw-r--r--activerecord/test/cases/multiple_db_test.rb4
3 files changed, 13 insertions, 13 deletions
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