aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration_test.rb
diff options
context:
space:
mode:
authorJoseph Wilk <josephwilk@joesniff.co.uk>2009-03-12 13:21:22 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-06-21 19:51:32 +0100
commiteb30e4ca40370b416566f1bbaf0204bb379883e4 (patch)
tree16a0df573a65d4cfc922a07b54b4a44d902e81dc /activerecord/test/cases/migration_test.rb
parentb26c2c11ab47dbd4d1e26806d1e861edc7d697e0 (diff)
downloadrails-eb30e4ca40370b416566f1bbaf0204bb379883e4.tar.gz
rails-eb30e4ca40370b416566f1bbaf0204bb379883e4.tar.bz2
rails-eb30e4ca40370b416566f1bbaf0204bb379883e4.zip
Fixed a bug where create_table could not be called without a block [#2221 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/cases/migration_test.rb')
-rw-r--r--activerecord/test/cases/migration_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 9ff95ae842..215b5a427a 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -293,6 +293,13 @@ if ActiveRecord::Base.connection.supports_migrations?
Person.connection.drop_table table_name rescue nil
end
+ def test_create_table_without_a_block
+ table_name = :testings
+ Person.connection.create_table table_name
+ ensure
+ Person.connection.drop_table table_name rescue nil
+ end
+
# Sybase, and SQLite3 will not allow you to add a NOT NULL
# column to a table without a default value.
unless current_adapter?(:SybaseAdapter, :SQLiteAdapter)