From a36bda87703ca12e88961cfaa5aed4014c69a9d3 Mon Sep 17 00:00:00 2001 From: David Paschich Date: Sat, 2 Jun 2012 19:16:49 -0700 Subject: The resolver tests fail if the mysql gem is not installed; this breaks being able to run the sqlite3 tests without that gem. This fix ensures the tests will only run if the mysql gem is installed. A better solution might be to move these tests into the per-adapter tests, and test each adapter's resolver. --- activerecord/test/cases/connection_specification/resolver_test.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/activerecord/test/cases/connection_specification/resolver_test.rb b/activerecord/test/cases/connection_specification/resolver_test.rb index e6cb1b9521..673a2b2b88 100644 --- a/activerecord/test/cases/connection_specification/resolver_test.rb +++ b/activerecord/test/cases/connection_specification/resolver_test.rb @@ -9,6 +9,7 @@ module ActiveRecord end def test_url_host_no_db + skip "only if mysql is available" unless defined?(MysqlAdapter) spec = resolve 'mysql://foo?encoding=utf8' assert_equal({ :adapter => "mysql", @@ -18,6 +19,7 @@ module ActiveRecord end def test_url_host_db + skip "only if mysql is available" unless defined?(MysqlAdapter) spec = resolve 'mysql://foo/bar?encoding=utf8' assert_equal({ :adapter => "mysql", @@ -27,6 +29,7 @@ module ActiveRecord end def test_url_port + skip "only if mysql is available" unless defined?(MysqlAdapter) spec = resolve 'mysql://foo:123?encoding=utf8' assert_equal({ :adapter => "mysql", -- cgit v1.2.3