diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-21 11:54:29 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-21 11:54:29 -0700 |
commit | f4ed9751251b2e979ee7bf38faf74371e78bbf42 (patch) | |
tree | 9bf9fb59a8719c5cd75499037ca8071822b65a0e /activerecord/test/cases/adapters | |
parent | 16921437a19221cef30dbb18601545d7e2a9a527 (diff) | |
download | rails-f4ed9751251b2e979ee7bf38faf74371e78bbf42.tar.gz rails-f4ed9751251b2e979ee7bf38faf74371e78bbf42.tar.bz2 rails-f4ed9751251b2e979ee7bf38faf74371e78bbf42.zip |
move around tests
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/mysql/connection_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/mysql/connection_test.rb b/activerecord/test/cases/adapters/mysql/connection_test.rb index eee771ecff..2a89430da9 100644 --- a/activerecord/test/cases/adapters/mysql/connection_test.rb +++ b/activerecord/test/cases/adapters/mysql/connection_test.rb @@ -13,6 +13,16 @@ class MysqlConnectionTest < ActiveRecord::TestCase end end + def test_connect_with_url + run_without_connection do |orig| + ar_config = ARTest.connection_config['arunit'] + url = "mysql://#{ar_config["username"]}@localhost/#{ar_config["database"]}" + klass = Class.new(ActiveRecord::Base) + klass.establish_connection(url) + assert_equal ar_config['database'], klass.connection.current_database + end + end + def test_mysql_reconnect_attribute_after_connection_with_reconnect_false run_without_connection do |orig_connection| ActiveRecord::Base.establish_connection(orig_connection.merge({:reconnect => false})) |