From 13d2a081645db873379668b6f21e449201b6b036 Mon Sep 17 00:00:00 2001 From: rohit Date: Thu, 2 Sep 2010 16:15:22 +0530 Subject: Add two integration tests for GeneratedAttribute missing type error. [#5461 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/test/generators/scaffold_generator_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (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 f12445ae35..446bed3269 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -231,4 +231,10 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_file "config/routes.rb", /\.routes\.draw do\s*\|map\|\s*$/ end + + def test_scaffold_generator_outputs_error_message_on_missing_attribute_type + content = capture(:stderr) { run_generator ["post", "title:string", "body"]} + assert_match /Missing type for attribute 'body'/, content + assert_match /Example: 'body:string' where string is the type/, content + end end -- cgit v1.2.3