From 5bed0e5cc0ae85975352808022201cf7431684e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 12 Mar 2012 19:41:17 -0300 Subject: Do not use the attributes hash in the scaffold functional tests --- railties/test/generators/scaffold_generator_test.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 2db8090621..d983ae8b49 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -62,8 +62,12 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase end end - assert_file "test/functional/product_lines_controller_test.rb", - /class ProductLinesControllerTest < ActionController::TestCase/ + assert_file "test/functional/product_lines_controller_test.rb" do |test| + assert_match(/class ProductLinesControllerTest < ActionController::TestCase/, test) + assert_match(/@valid_attributes = @product_line\.attributes\.slice\("title"\)/, test) + assert_match(/post :create, product_line: @valid_attributes/, test) + assert_match(/put :update, id: @product_line, product_line: @valid_attributes/, test) + end # Views %w( -- cgit v1.2.3