diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-04 03:29:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-04 03:29:59 -0700 |
commit | 0e407a90413d8a19002b85508d811ccdf2190783 (patch) | |
tree | 92c006a22d094276225bcfc497a9941eb56e85f8 /activerecord/test | |
parent | 533a9f84b035756eedf9fdccf0c494dc9701ba72 (diff) | |
parent | 696c2ea68d7cdbf7eb15f7dce2d83498ef659eb7 (diff) | |
download | rails-0e407a90413d8a19002b85508d811ccdf2190783.tar.gz rails-0e407a90413d8a19002b85508d811ccdf2190783.tar.bz2 rails-0e407a90413d8a19002b85508d811ccdf2190783.zip |
Merge pull request #1163 from amatsuda/sexier_migration_31
Sexier migrations
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 20 |
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 |