diff options
author | Matthew Draper <matthew@trebex.net> | 2014-04-09 01:41:11 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2014-04-09 01:46:48 +0930 |
commit | d72a0cbc807a14d3eec02a53317d11b9d9fa5815 (patch) | |
tree | 19727f545f516c39720a9f2277de6c810a1f731c /activerecord/test/cases | |
parent | 88cd65b174d9a75d9cb0e5e06a57615ccc80fff1 (diff) | |
download | rails-d72a0cbc807a14d3eec02a53317d11b9d9fa5815.tar.gz rails-d72a0cbc807a14d3eec02a53317d11b9d9fa5815.tar.bz2 rails-d72a0cbc807a14d3eec02a53317d11b9d9fa5815.zip |
Drop in @jeremy's new database.yml template text
In passing, allow multi-word adapters to be referenced in a URL:
underscored_name must become hyphened-name.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/connection_adapters/connection_handler_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb index 256ddd7d23..f2d18e812d 100644 --- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb +++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb @@ -89,6 +89,14 @@ module ActiveRecord assert_equal expect_prod, actual["default_env"] end + def test_url_with_hyphenated_scheme + ENV['DATABASE_URL'] = "ibm-db://localhost/foo" + config = { "default_env" => { "adapter" => "not_postgres", "database" => "not_foo", "host" => "localhost" } } + actual = resolve(:default_env, config) + expected = { "adapter"=>"ibm_db", "database"=>"foo", "host"=>"localhost" } + assert_equal expected, actual + end + def test_string_connection config = { "default_env" => "postgres://localhost/foo" } actual = klass.new(config).resolve |