diff options
author | Prem Sichanugrist <s@sikachu.com> | 2011-01-01 01:15:42 +0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-04 11:16:52 -0800 |
commit | 9e64dfad0df4ed8a10d2ad2a17cd0848017d652c (patch) | |
tree | 8f77591fd7aa3a9c98dbbc336ada4cb327d4ae68 /railties | |
parent | 40afcade0dc1450e765a91fc15a6ac6d442c9826 (diff) | |
download | rails-9e64dfad0df4ed8a10d2ad2a17cd0848017d652c.tar.gz rails-9e64dfad0df4ed8a10d2ad2a17cd0848017d652c.tar.bz2 rails-9e64dfad0df4ed8a10d2ad2a17cd0848017d652c.zip |
Use Rails 3.1 `change` method in model generator
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/model_generator_test.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/railties/test/generators/model_generator_test.rb b/railties/test/generators/model_generator_test.rb index 552b7eb30a..b86859666e 100644 --- a/railties/test/generators/model_generator_test.rb +++ b/railties/test/generators/model_generator_test.rb @@ -99,15 +99,11 @@ class ModelGeneratorTest < Rails::Generators::TestCase run_generator ["product", "name:string", "supplier_id:integer"] assert_migration "db/migrate/create_products.rb" do |m| - assert_method :up, m do |up| + assert_method :change, m do |up| assert_match /create_table :products/, up assert_match /t\.string :name/, up assert_match /t\.integer :supplier_id/, up end - - assert_method :down, m do |down| - assert_match /drop_table :products/, down - end end end @@ -141,7 +137,7 @@ class ModelGeneratorTest < Rails::Generators::TestCase run_generator ["account", "--no-timestamps"] assert_migration "db/migrate/create_accounts.rb" do |m| - assert_method :up, m do |up| + assert_method :change, m do |up| assert_no_match /t.timestamps/, up end end |