From 88cd65b174d9a75d9cb0e5e06a57615ccc80fff1 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Wed, 9 Apr 2014 00:55:49 +0930 Subject: Don't deprecate after all --- .../connection_adapters/connection_handler_test.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb index a7002bd13d..256ddd7d23 100644 --- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb +++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb @@ -28,7 +28,7 @@ module ActiveRecord def test_resolver_with_database_uri_and_current_env_symbol_key ENV['DATABASE_URL'] = "postgres://localhost/foo" config = { "not_production" => { "adapter" => "not_postgres", "database" => "not_foo" } } - actual = assert_deprecated { resolve(:default_env, config) } + actual = resolve(:default_env, config) expected = { "adapter"=>"postgresql", "database"=>"foo", "host"=>"localhost" } assert_equal expected, actual end @@ -44,7 +44,7 @@ module ActiveRecord def test_resolver_with_database_uri_and_known_key ENV['DATABASE_URL'] = "postgres://localhost/foo" config = { "production" => { "adapter" => "not_postgres", "database" => "not_foo", "host" => "localhost" } } - actual = assert_deprecated { resolve(:production, config) } + actual = resolve(:production, config) expected = { "adapter"=>"not_postgres", "database"=>"not_foo", "host"=>"localhost" } assert_equal expected, actual end @@ -52,10 +52,8 @@ module ActiveRecord def test_resolver_with_database_uri_and_unknown_symbol_key ENV['DATABASE_URL'] = "postgres://localhost/foo" config = { "not_production" => { "adapter" => "not_postgres", "database" => "not_foo" } } - assert_deprecated do - assert_raises AdapterNotSpecified do - resolve(:production, config) - end + assert_raises AdapterNotSpecified do + resolve(:production, config) end end @@ -72,7 +70,7 @@ module ActiveRecord def test_resolver_with_database_uri_and_supplied_url ENV['DATABASE_URL'] = "not-postgres://not-localhost/not_foo" config = { "production" => { "adapter" => "also_not_postgres", "database" => "also_not_foo" } } - actual = assert_deprecated { resolve("postgres://localhost/foo", config) } + actual = resolve("postgres://localhost/foo", config) expected = { "adapter"=>"postgresql", "database"=>"foo", "host"=>"localhost" } assert_equal expected, actual end @@ -86,7 +84,7 @@ module ActiveRecord def test_environment_does_not_exist_in_config_url_does_exist ENV['DATABASE_URL'] = "postgres://localhost/foo" config = { "not_default_env" => { "adapter" => "not_postgres", "database" => "not_foo" } } - actual = assert_deprecated { klass.new(config).resolve } + actual = klass.new(config).resolve expect_prod = { "adapter"=>"postgresql", "database"=>"foo", "host"=>"localhost" } assert_equal expect_prod, actual["default_env"] end @@ -131,7 +129,7 @@ module ActiveRecord ENV['DATABASE_URL'] = "postgres://localhost/foo" config = {} - actual = assert_deprecated { klass.new(config).resolve } + actual = klass.new(config).resolve expected = { "adapter" => "postgresql", "database" => "foo", "host" => "localhost" } @@ -162,7 +160,7 @@ module ActiveRecord ENV['DATABASE_URL'] = "postgres://localhost/foo" config = {"default_env" => { "pool" => "5" } } - actual = assert_deprecated { klass.new(config).resolve } + actual = klass.new(config).resolve expected = { "default_env" => { "adapter" => "postgresql", "database" => "foo", @@ -177,7 +175,7 @@ module ActiveRecord ENV['DATABASE_URL'] = "postgres://localhost/foo" config = {"default_env" => { "adapter" => "NOT-POSTGRES", "database" => "NOT-FOO", "pool" => "5" } } - actual = assert_deprecated { klass.new(config).resolve } + actual = klass.new(config).resolve expected = { "default_env" => { "adapter" => "postgresql", "database" => "foo", -- cgit v1.2.3