diff options
Diffstat (limited to 'railties/test/generators/named_base_test.rb')
-rw-r--r-- | railties/test/generators/named_base_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/generators/named_base_test.rb b/railties/test/generators/named_base_test.rb index f23701e99e..2bc2c33a72 100644 --- a/railties/test/generators/named_base_test.rb +++ b/railties/test/generators/named_base_test.rb @@ -108,6 +108,15 @@ class NamedBaseTest < Rails::Generators::TestCase assert_name g, 'sheep_index', :index_helper end + def test_hide_namespace + g = generator ['Hidden'] + g.class.stubs(:namespace).returns('hidden') + + assert !Rails::Generators.hidden_namespaces.include?('hidden') + g.class.hide! + assert Rails::Generators.hidden_namespaces.include?('hidden') + end + protected def assert_name(generator, value, method) |