From 7c00cde79f7973d168b1b6aaa396594447e39a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 13 Mar 2012 14:19:03 -0300 Subject: Refactor the test_unit scaffold generator to use the key_value method --- railties/test/generators/scaffold_generator_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/test/generators/scaffold_generator_test.rb') 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 -- cgit v1.2.3