Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10884: drop_table_test.2.diff

File drop_table_test.2.diff, 0.8 kB (added by kampers, 8 months ago)
  • activerecord/test/cases/migration_test.rb

    old new  
    181181      Person.connection.drop_table :testings rescue nil 
    182182    end 
    183183 
     184    def test_drop_table 
     185      Person.connection.create_table :test_drop_table do |t| 
     186        t.column :foo, :string 
     187      end 
     188      Person.connection.drop_table :test_drop_table 
     189      assert !Person.connection.tables.include?(:test_drop_table) 
     190    end 
     191 
    184192    # SQL Server, Sybase, and SQLite3 will not allow you to add a NOT NULL 
    185193    # column to a table without a default value. 
    186194    unless current_adapter?(:SQLServerAdapter, :SybaseAdapter, :SQLiteAdapter)