aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration_test.rb
diff options
context:
space:
mode:
authorBrian Lopez <seniorlopez@gmail.com>2010-08-02 01:37:57 -0700
committerBrian Lopez <seniorlopez@gmail.com>2010-08-02 01:37:57 -0700
commit21e81da33570ba9453831cfc59c4f42ff9cdc1b2 (patch)
tree80146b258842d120e3362119971971911ca6a0ef /activerecord/test/cases/migration_test.rb
parentfb0bd8c1092db51888ec4bb72af6c595e13c31fa (diff)
downloadrails-21e81da33570ba9453831cfc59c4f42ff9cdc1b2.tar.gz
rails-21e81da33570ba9453831cfc59c4f42ff9cdc1b2.tar.bz2
rails-21e81da33570ba9453831cfc59c4f42ff9cdc1b2.zip
update tests for mysql2 support
Diffstat (limited to 'activerecord/test/cases/migration_test.rb')
-rw-r--r--activerecord/test/cases/migration_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 2c3fc46831..0cf3979694 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -256,7 +256,7 @@ if ActiveRecord::Base.connection.supports_migrations?
def test_create_table_with_defaults
# MySQL doesn't allow defaults on TEXT or BLOB columns.
- mysql = current_adapter?(:MysqlAdapter)
+ mysql = current_adapter?(:MysqlAdapter) || current_adapter?(:Mysql2Adapter)
Person.connection.create_table :testings do |t|
t.column :one, :string, :default => "hello"
@@ -313,7 +313,7 @@ if ActiveRecord::Base.connection.supports_migrations?
assert_equal 'integer', four.sql_type
assert_equal 'bigint', eight.sql_type
assert_equal 'integer', eleven.sql_type
- elsif current_adapter?(:MysqlAdapter)
+ elsif current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
assert_match 'int(11)', default.sql_type
assert_match 'tinyint', one.sql_type
assert_match 'int', four.sql_type
@@ -581,7 +581,7 @@ if ActiveRecord::Base.connection.supports_migrations?
assert_kind_of BigDecimal, bob.wealth
end
- if current_adapter?(:MysqlAdapter)
+ if current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
def test_unabstracted_database_dependent_types
Person.delete_all
@@ -621,7 +621,7 @@ if ActiveRecord::Base.connection.supports_migrations?
assert !Person.column_methods_hash.include?(:last_name)
end
- if current_adapter?(:MysqlAdapter)
+ if current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
def testing_table_for_positioning
Person.connection.create_table :testings, :id => false do |t|
t.column :first, :integer
@@ -1447,7 +1447,7 @@ if ActiveRecord::Base.connection.supports_migrations?
columns = Person.connection.columns(:binary_testings)
data_column = columns.detect { |c| c.name == "data" }
- if current_adapter?(:MysqlAdapter)
+ if current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
assert_equal '', data_column.default
else
assert_nil data_column.default
@@ -1748,7 +1748,7 @@ if ActiveRecord::Base.connection.supports_migrations?
end
def integer_column
- if current_adapter?(:MysqlAdapter)
+ if current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
'int(11)'
elsif current_adapter?(:OracleAdapter)
'NUMBER(38)'