diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2013-12-23 12:28:04 -0800 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2013-12-23 12:28:04 -0800 |
commit | 33cb2f334db7d8c173a7f801a678fe5696169ed7 (patch) | |
tree | 2bb07cdaad4af8c43ccc891503630bbed12cbf89 /activerecord/test | |
parent | 7530c82e8257effa8ee3a7e0a2f7aed39502d201 (diff) | |
parent | 2d4cfb28408f53daea11f45fb5e0aebdce8963d3 (diff) | |
download | rails-33cb2f334db7d8c173a7f801a678fe5696169ed7.tar.gz rails-33cb2f334db7d8c173a7f801a678fe5696169ed7.tar.bz2 rails-33cb2f334db7d8c173a7f801a678fe5696169ed7.zip |
Merge pull request #13463 from josevalim/jv-env
Do not store production information in .yml files
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/connection_specification/resolver_test.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/activerecord/test/cases/connection_specification/resolver_test.rb b/activerecord/test/cases/connection_specification/resolver_test.rb index 528de07eab..8d3813b47f 100644 --- a/activerecord/test/cases/connection_specification/resolver_test.rb +++ b/activerecord/test/cases/connection_specification/resolver_test.rb @@ -4,8 +4,8 @@ module ActiveRecord module ConnectionAdapters class ConnectionSpecification class ResolverTest < ActiveRecord::TestCase - def resolve(spec) - Resolver.new(spec, {}).spec.config + def resolve(spec, config={}) + Resolver.new(config).resolve(spec).config end def test_url_invalid_adapter @@ -17,6 +17,14 @@ module ActiveRecord # The abstract adapter is used simply to bypass the bit of code that # checks that the adapter file can be required in. + def test_url_from_environment + spec = resolve :production, 'production' => 'abstract://foo?encoding=utf8' + assert_equal({ + adapter: "abstract", + host: "foo", + encoding: "utf8" }, spec) + end + def test_url_host_no_db spec = resolve 'abstract://foo?encoding=utf8' assert_equal({ |