diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-18 16:14:32 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-18 16:21:11 +0100 |
commit | a2b76d1dde09ad1a93a0e631bd6ba9a00f5cc1d5 (patch) | |
tree | 74172636adc0701ff5f75d6ae72553bfd30a8b0b /railties/test | |
parent | 61f77b1dcd1d5fb18ada2c9a739557ef6c49a910 (diff) | |
download | rails-a2b76d1dde09ad1a93a0e631bd6ba9a00f5cc1d5.tar.gz rails-a2b76d1dde09ad1a93a0e631bd6ba9a00f5cc1d5.tar.bz2 rails-a2b76d1dde09ad1a93a0e631bd6ba9a00f5cc1d5.zip |
Improve generators help.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators_test.rb | 17 |
1 files changed, 9 insertions, 8 deletions
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 |