From eb30e4ca40370b416566f1bbaf0204bb379883e4 Mon Sep 17 00:00:00 2001 From: Joseph Wilk Date: Thu, 12 Mar 2009 13:21:22 +0000 Subject: Fixed a bug where create_table could not be called without a block [#2221 state:resolved] Signed-off-by: Pratik Naik --- activerecord/test/cases/migration_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/test') 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) -- cgit v1.2.3