From a2b76d1dde09ad1a93a0e631bd6ba9a00f5cc1d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 18 Jan 2010 16:14:32 +0100 Subject: Improve generators help. --- railties/test/generators_test.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'railties/test') diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index fdd72d6361..674bdadf41 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -85,19 +85,20 @@ class GeneratorsTest < GeneratorsTestCase assert_match /Rails 2\.x generator/, output end - def test_builtin_generators - assert Rails::Generators.builtin.include?("rails:model") - end - def test_rails_generators_help_with_builtin_information output = capture(:stdout){ Rails::Generators.help } - assert_match /model/, output - assert_match /scaffold_controller/, output + assert_match /Rails:/, output + assert_match /^ model$/, output + assert_match /^ scaffold_controller$/, output end def test_rails_generators_with_others_information - output = capture(:stdout){ Rails::Generators.help }.split("\n").last - assert_equal "Others: active_record:fixjour, fixjour, foobar:foobar, mspec, rails:javascripts, xspec.", output + output = capture(:stdout){ Rails::Generators.help } + assert_match /ActiveRecord:/, output + assert_match /Fixjour:/, output + assert_match /^ active_record:model$/, output + assert_match /^ active_record:fixjour$/, output + assert_match /^ fixjour$/, output end def test_no_color_sets_proper_shell -- cgit v1.2.3