From 441227a10f42fcd28b65ab416495ff8f4fc45b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 3 Jan 2010 15:13:54 +0100 Subject: Create Rails::Generators::TestCase. --- railties/test/generators/migration_generator_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/test/generators/migration_generator_test.rb') diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb index 35172a8be4..f8273f8a1a 100644 --- a/railties/test/generators/migration_generator_test.rb +++ b/railties/test/generators/migration_generator_test.rb @@ -21,12 +21,12 @@ class MigrationGeneratorTest < GeneratorsTestCase run_generator [@migration, "title:string", "body:text"] assert_migration "db/migrate/#{@migration}.rb" do |content| - assert_class_method content, :up do |up| + assert_class_method :up, content do |up| assert_match /add_column :posts, :title, :string/, up assert_match /add_column :posts, :body, :text/, up end - assert_class_method content, :down do |down| + assert_class_method :down, content do |down| assert_match /remove_column :posts, :title/, down assert_match /remove_column :posts, :body/, down end @@ -38,12 +38,12 @@ class MigrationGeneratorTest < GeneratorsTestCase run_generator [@migration, "title:string", "body:text"] assert_migration "db/migrate/#{@migration}.rb" do |content| - assert_class_method content, :up do |up| + assert_class_method :up, content do |up| assert_match /remove_column :posts, :title/, up assert_match /remove_column :posts, :body/, up end - assert_class_method content, :down do |down| + assert_class_method :down, content do |down| assert_match /add_column :posts, :title, :string/, down assert_match /add_column :posts, :body, :text/, down end -- cgit v1.2.3