Permalink
Browse files

Merge pull request #13478 from schneems/schneems/fix-mysql

Move mysql2 test for when adapter will be loaded
  • Loading branch information...
2 parents 2aceccf + 8e2c080 commit 278bbfd7df68f50703626ee59c64a2d92928a454 @guilleiguaran guilleiguaran committed Dec 25, 2013
@@ -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)
@@ -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')

0 comments on commit 278bbfd

Please sign in to comment.