Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix the skip code.

Checking for the constant doesn't work
  • Loading branch information...
commit 81679ab2ae8c9f6a233374efe9fcf096cf9f8fd9 1 parent 1743e95
Rafael Mendonça França rafaelfranca authored
8 activerecord/test/cases/connection_specification/resolver_test.rb
View
@@ -9,7 +9,7 @@ def resolve(spec)
end
def test_url_host_no_db
- skip "only if mysql is available" unless defined?(MysqlAdapter)
+ skip "only if mysql is available" unless current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
spec = resolve 'mysql://foo?encoding=utf8'
assert_equal({
:adapter => "mysql",
@@ -18,7 +18,7 @@ def test_url_host_no_db
end
def test_url_host_db
- skip "only if mysql is available" unless defined?(MysqlAdapter)
+ skip "only if mysql is available" unless current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
spec = resolve 'mysql://foo/bar?encoding=utf8'
assert_equal({
:adapter => "mysql",
@@ -28,7 +28,7 @@ def test_url_host_db
end
def test_url_port
- skip "only if mysql is available" unless defined?(MysqlAdapter)
+ skip "only if mysql is available" unless current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
spec = resolve 'mysql://foo:123?encoding=utf8'
assert_equal({
:adapter => "mysql",
@@ -38,7 +38,7 @@ def test_url_port
end
def test_encoded_password
- skip "only if mysql is available" unless defined?(MysqlAdapter)
+ skip "only if mysql is available" unless current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
password = 'am@z1ng_p@ssw0rd#!'
encoded_password = URI.encode_www_form_component(password)
spec = resolve "mysql://foo:#{encoded_password}@localhost/bar"
Please sign in to comment.
Something went wrong with that request. Please try again.