aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/scaffold_controller_generator_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-03-13 14:19:03 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-03-13 14:19:03 -0300
commit7c00cde79f7973d168b1b6aaa396594447e39a0a (patch)
tree8e69f483a8361c9a5a409e216571201b1e0e2030 /railties/test/generators/scaffold_controller_generator_test.rb
parent21b69b233bda5870274c84ef8178c9ad9a47c390 (diff)
downloadrails-7c00cde79f7973d168b1b6aaa396594447e39a0a.tar.gz
rails-7c00cde79f7973d168b1b6aaa396594447e39a0a.tar.bz2
rails-7c00cde79f7973d168b1b6aaa396594447e39a0a.zip
Refactor the test_unit scaffold generator to use the key_value method
Diffstat (limited to 'railties/test/generators/scaffold_controller_generator_test.rb')
-rw-r--r--railties/test/generators/scaffold_controller_generator_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/generators/scaffold_controller_generator_test.rb b/railties/test/generators/scaffold_controller_generator_test.rb
index 03a753151d..1eea50b0d9 100644
--- a/railties/test/generators/scaffold_controller_generator_test.rb
+++ b/railties/test/generators/scaffold_controller_generator_test.rb
@@ -75,8 +75,8 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase
assert_file "test/functional/users_controller_test.rb" do |content|
assert_match(/class UsersControllerTest < ActionController::TestCase/, content)
assert_match(/test "should get index"/, content)
- assert_match(/post :create, user: { age: @user.age, name: @user.name }/, content)
- assert_match(/put :update, id: @user, user: { age: @user.age, name: @user.name }/, content)
+ assert_match(/post :create, user: \{ age: @user.age, name: @user.name \}/, content)
+ assert_match(/put :update, id: @user, user: \{ age: @user.age, name: @user.name \}/, content)
end
end
@@ -86,8 +86,8 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase
assert_file "test/functional/users_controller_test.rb" do |content|
assert_match(/class UsersControllerTest < ActionController::TestCase/, content)
assert_match(/test "should get index"/, content)
- assert_match(/post :create, user: { }/, content)
- assert_match(/put :update, id: @user, user: { }/, content)
+ assert_match(/post :create, user: \{ \}/, content)
+ assert_match(/put :update, id: @user, user: \{ \}/, content)
end
end