aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/migration_generator_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-24 22:06:25 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-24 22:06:25 +0100
commit7c9bcbb5e486a5d5e35d38c5fbcbea6af88fc23a (patch)
tree79137e242ad4e02463503391f68bb589f531c745 /railties/test/generators/migration_generator_test.rb
parentb28ed2bd4fb094c9420d14b858cebb47373e48d8 (diff)
downloadrails-7c9bcbb5e486a5d5e35d38c5fbcbea6af88fc23a.tar.gz
rails-7c9bcbb5e486a5d5e35d38c5fbcbea6af88fc23a.tar.bz2
rails-7c9bcbb5e486a5d5e35d38c5fbcbea6af88fc23a.zip
Use 1.9 hash syntax instead.
Diffstat (limited to 'railties/test/generators/migration_generator_test.rb')
-rw-r--r--railties/test/generators/migration_generator_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb
index d81fc59fbf..68fbd58061 100644
--- a/railties/test/generators/migration_generator_test.rb
+++ b/railties/test/generators/migration_generator_test.rb
@@ -69,7 +69,7 @@ class MigrationGeneratorTest < Rails::Generators::TestCase
assert_match(/add_column :posts, :user_id, :integer/, up)
end
assert_match(/add_index :posts, :title/, content)
- assert_match(/add_index :posts, :user_id, :unique => true/, content)
+ assert_match(/add_index :posts, :user_id, unique: true/, content)
end
end
@@ -99,7 +99,7 @@ class MigrationGeneratorTest < Rails::Generators::TestCase
assert_match(/add_column :posts, :user_uuid, :string/, up)
end
assert_match(/add_index :posts, :title/, content)
- assert_match(/add_index :posts, :user_uuid, :unique => true/, content)
+ assert_match(/add_index :posts, :user_uuid, unique: true/, content)
end
end
@@ -109,14 +109,14 @@ class MigrationGeneratorTest < Rails::Generators::TestCase
assert_migration "db/migrate/#{migration}.rb" do |content|
assert_method :change, content do |up|
- assert_match(/add_column :books, :title, :string, :limit=>40/, up)
- assert_match(/add_column :books, :content, :string, :limit=>255/, up)
- assert_match(/add_column :books, :price, :decimal, :precision=>5, :scale=>2/, up)
- assert_match(/add_column :books, :discount, :decimal, :precision=>3, :scale=>2/, up)
+ assert_match(/add_column :books, :title, :string, limit: 40/, up)
+ assert_match(/add_column :books, :content, :string, limit: 255/, up)
+ assert_match(/add_column :books, :price, :decimal, precision: 5, scale: 2/, up)
+ assert_match(/add_column :books, :discount, :decimal, precision: 3, scale: 2/, up)
end
assert_match(/add_index :books, :title/, content)
assert_match(/add_index :books, :price/, content)
- assert_match(/add_index :books, :discount, :unique => true/, content)
+ assert_match(/add_index :books, :discount, unique: true/, content)
end
end