Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move mysql2 test for when adapter will be loaded

When run with only the Mysql adapter, we get this failure: https://travis-ci.org/rails/rails/jobs/15937907#L2416

Porting the test over to only run when mysql2 is loaded
  • Loading branch information...
commit 8e2c0803f5e114f74ce0e8acc44ae43da97175e3 1 parent f89c5f4
Richard Schneeman schneems authored
7 activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
View
@@ -23,13 +23,6 @@ def test_bad_connection_mysql
end
end
- def test_bad_connection_mysql2
- assert_raise ActiveRecord::NoDatabaseError do
- connection = ActiveRecord::Base.mysql2_connection(adapter: "mysql2", database: "should_not_exist-cinco-dog-db")
- connection.exec_query('drop table if exists ex')
- end
- end
-
def test_valid_column
column = @conn.columns('ex').find { |col| col.name == 'id' }
assert @conn.valid_type?(column.type)
7 activerecord/test/cases/adapters/mysql2/connection_test.rb
View
@@ -13,6 +13,13 @@ def teardown
super
end
+ def test_bad_connection
+ assert_raise ActiveRecord::NoDatabaseError do
+ connection = ActiveRecord::Base.mysql2_connection(adapter: "mysql2", database: "should_not_exist-cinco-dog-db")
+ connection.exec_query('drop table if exists ex')
+ end
+ end
+
def test_no_automatic_reconnection_after_timeout
assert @connection.active?
@connection.update('set @@wait_timeout=1')
Please sign in to comment.
Something went wrong with that request. Please try again.