diff options
Diffstat (limited to 'railties/test/generators_test.rb')
-rw-r--r-- | railties/test/generators_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index c7195f753d..964def4158 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -81,7 +81,13 @@ class GeneratorsTest < GeneratorsTestCase def test_rails_generators_with_others_information output = capture(:stdout){ Rails::Generators.help }.split("\n").last - assert_equal "Others: active_record:fixjour, fixjour, mspec, rails:javascripts.", output + assert_equal "Others: active_record:fixjour, fixjour, mspec, rails:javascripts, wrong.", output + end + + def test_warning_is_raised_if_generator_cant_be_loaded + output = capture(:stderr){ Rails::Generators.find_by_namespace(:wrong) } + assert_match /\[WARNING\] Could not load generator at/, output + assert_match /Error: uninitialized constant Rails::Generator/, output end def test_no_color_sets_proper_shell |