diff options
author | Arthur Neves <arthurnn@gmail.com> | 2016-05-24 23:57:43 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2016-05-24 23:57:43 -0400 |
commit | 779ccf8a0e6a8bf7bb362c30dac4a340599ab113 (patch) | |
tree | 6ba707f5fca16144290128c4a3eb386ca6a6968c /activerecord/test/cases/connection_specification | |
parent | 5167b8f7ffa66c8772c455916b8418844e3b4674 (diff) | |
download | rails-779ccf8a0e6a8bf7bb362c30dac4a340599ab113.tar.gz rails-779ccf8a0e6a8bf7bb362c30dac4a340599ab113.tar.bz2 rails-779ccf8a0e6a8bf7bb362c30dac4a340599ab113.zip |
Remove `name` from `establish_connection`
Instead of passing a separete name variable, we can make the resolver
merge a name on the config, and use that before creating the Specification.
Diffstat (limited to 'activerecord/test/cases/connection_specification')
-rw-r--r-- | activerecord/test/cases/connection_specification/resolver_test.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/activerecord/test/cases/connection_specification/resolver_test.rb b/activerecord/test/cases/connection_specification/resolver_test.rb index 3bddaf32ec..b30a83d9ce 100644 --- a/activerecord/test/cases/connection_specification/resolver_test.rb +++ b/activerecord/test/cases/connection_specification/resolver_test.rb @@ -28,7 +28,8 @@ module ActiveRecord assert_equal({ "adapter" => "abstract", "host" => "foo", - "encoding" => "utf8" }, spec) + "encoding" => "utf8", + "name" => "production"}, spec) end def test_url_sub_key @@ -36,7 +37,8 @@ module ActiveRecord assert_equal({ "adapter" => "abstract", "host" => "foo", - "encoding" => "utf8" }, spec) + "encoding" => "utf8", + "name" => "production"}, spec) end def test_url_sub_key_merges_correctly @@ -46,7 +48,8 @@ module ActiveRecord "adapter" => "abstract", "host" => "foo", "encoding" => "utf8", - "pool" => "3" }, spec) + "pool" => "3", + "name" => "production"}, spec) end def test_url_host_no_db @@ -113,7 +116,8 @@ module ActiveRecord assert_equal({ "adapter" => "sqlite3", "database" => "foo", - "encoding" => "utf8" }, spec) + "encoding" => "utf8", + "name" => "production"}, spec) end def test_spec_name_on_key_lookup |