diff options
author | Matthew Draper <matthew@trebex.net> | 2014-04-09 00:55:49 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2014-04-09 00:58:44 +0930 |
commit | 88cd65b174d9a75d9cb0e5e06a57615ccc80fff1 (patch) | |
tree | 8ebf8a6bfb0f04d07c528a42ccbfe6f7acd8a431 /activerecord/test/cases/connection_adapters | |
parent | 615e0dcdf1391a8b71ad6556c2e7b9cedf6ffa12 (diff) | |
download | rails-88cd65b174d9a75d9cb0e5e06a57615ccc80fff1.tar.gz rails-88cd65b174d9a75d9cb0e5e06a57615ccc80fff1.tar.bz2 rails-88cd65b174d9a75d9cb0e5e06a57615ccc80fff1.zip |
Don't deprecate after all
Diffstat (limited to 'activerecord/test/cases/connection_adapters')
-rw-r--r-- | activerecord/test/cases/connection_adapters/connection_handler_test.rb | 20 |
1 files changed, 9 insertions, 11 deletions
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", |