aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/scaffold_generator_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-03-13 14:20:43 -0700
committerJosé Valim <jose.valim@gmail.com>2012-03-13 14:20:43 -0700
commit2d3550c4be2cf3b30d25e1c94baa478c19471766 (patch)
tree6a72f87270c70a042d175ff807746695418412fd /railties/test/generators/scaffold_generator_test.rb
parentae67a63fe9c5be4b8e2ef74239ec340e99d231ac (diff)
parent7c00cde79f7973d168b1b6aaa396594447e39a0a (diff)
downloadrails-2d3550c4be2cf3b30d25e1c94baa478c19471766.tar.gz
rails-2d3550c4be2cf3b30d25e1c94baa478c19471766.tar.bz2
rails-2d3550c4be2cf3b30d25e1c94baa478c19471766.zip
Merge pull request #5415 from rafaelfranca/refactor
Refactor the test_unit scaffold generator to use the key_value method
Diffstat (limited to 'railties/test/generators/scaffold_generator_test.rb')
-rw-r--r--railties/test/generators/scaffold_generator_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb
index f4f0147156..7123950add 100644
--- a/railties/test/generators/scaffold_generator_test.rb
+++ b/railties/test/generators/scaffold_generator_test.rb
@@ -64,8 +64,8 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase
assert_file "test/functional/product_lines_controller_test.rb" do |test|
assert_match(/class ProductLinesControllerTest < ActionController::TestCase/, test)
- assert_match(/post :create, product_line: { title: @product_line.title }/, test)
- assert_match(/put :update, id: @product_line, product_line: { title: @product_line.title }/, test)
+ assert_match(/post :create, product_line: \{ title: @product_line.title \}/, test)
+ assert_match(/put :update, id: @product_line, product_line: \{ title: @product_line.title \}/, test)
end
# Views
@@ -94,8 +94,8 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase
assert_file "test/functional/product_lines_controller_test.rb" do |content|
assert_match(/class ProductLinesControllerTest < ActionController::TestCase/, content)
assert_match(/test "should get index"/, content)
- assert_match(/post :create, product_line: { }/, content)
- assert_match(/put :update, id: @product_line, product_line: { }/, content)
+ assert_match(/post :create, product_line: \{ \}/, content)
+ assert_match(/put :update, id: @product_line, product_line: \{ \}/, content)
end
end