diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index e8ad37d437..50242a497c 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -1742,6 +1742,21 @@ if ActiveRecord::Base.connection.supports_migrations? ensure Person.connection.drop_table :testings rescue nil end + + def test_create_table_should_not_have_mixed_syntax + assert_raise(NoMethodError) do + Person.connection.create_table :testings, :force => true do |t| + t.string :foo + integer :bar + end + end + assert_raise(NameError) do + Person.connection.create_table :testings, :force => true do + t.string :foo + integer :bar + end + end + end end # SexierMigrationsTest class MigrationLoggerTest < ActiveRecord::TestCase |