aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration_test.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index f61d0315d0..5c47a8ad33 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -1712,6 +1712,26 @@ if ActiveRecord::Base.connection.supports_migrations?
end # SexyMigrationsTest
+ class SexierMigrationsTest < ActiveRecord::TestCase
+ def test_create_table_with_column_without_block_parameter
+ Person.connection.create_table :testings, :force => true do
+ column :foo, :string
+ end
+ assert Person.connection.column_exists?(:testings, :foo, :string)
+ ensure
+ Person.connection.drop_table :testings rescue nil
+ end
+
+ def test_create_table_with_sexy_column_without_block_parameter
+ Person.connection.create_table :testings, :force => true do
+ integer :bar
+ end
+ assert Person.connection.column_exists?(:testings, :bar, :integer)
+ ensure
+ Person.connection.drop_table :testings rescue nil
+ end
+ end # SexierMigrationsTest
+
class MigrationLoggerTest < ActiveRecord::TestCase
def test_migration_should_be_run_without_logger
previous_logger = ActiveRecord::Base.logger