aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/migration_generator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/migration_generator_test.rb')
-rw-r--r--railties/test/generators/migration_generator_test.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb
index 6eecfc8e2e..337257df7d 100644
--- a/railties/test/generators/migration_generator_test.rb
+++ b/railties/test/generators/migration_generator_test.rb
@@ -35,8 +35,8 @@ class MigrationGeneratorTest < Rails::Generators::TestCase
assert_migration "db/migrate/#{migration}.rb" do |content|
assert_method :change, content do |up|
- assert_match /add_column :posts, :title, :string/, up
- assert_match /add_column :posts, :body, :text/, up
+ assert_match(/add_column :posts, :title, :string/, up)
+ assert_match(/add_column :posts, :body, :text/, up)
end
end
end
@@ -47,13 +47,13 @@ class MigrationGeneratorTest < Rails::Generators::TestCase
assert_migration "db/migrate/#{migration}.rb" do |content|
assert_method :up, content do |up|
- assert_match /remove_column :posts, :title/, up
- assert_match /remove_column :posts, :body/, up
+ assert_match(/remove_column :posts, :title/, up)
+ assert_match(/remove_column :posts, :body/, up)
end
assert_method :down, content do |down|
- assert_match /add_column :posts, :title, :string/, down
- assert_match /add_column :posts, :body, :text/, down
+ assert_match(/add_column :posts, :title, :string/, down)
+ assert_match(/add_column :posts, :body, :text/, down)
end
end
end
@@ -64,11 +64,11 @@ class MigrationGeneratorTest < Rails::Generators::TestCase
assert_migration "db/migrate/#{migration}.rb" do |content|
assert_method :up, content do |up|
- assert_match /^\s*$/, up
+ assert_match(/^\s*$/, up)
end
assert_method :down, content do |down|
- assert_match /^\s*$/, down
+ assert_match(/^\s*$/, down)
end
end
end