From e75ea474346e74e36d92febd47985c3571b1472b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 18 Jan 2010 12:28:52 +0100 Subject: Automatically remove :generators: from namespaces. --- railties/test/generators/actions_test.rb | 2 +- railties/test/generators/app_generator_test.rb | 2 +- railties/test/generators_test.rb | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'railties/test') diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 196cec3ce7..b59ec524e8 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -20,7 +20,7 @@ class ActionsTest < GeneratorsTestCase end def test_invoke_other_generator_with_full_namespace - action :invoke, 'rails:generators:model', ['my_model'] + action :invoke, 'rails:model', ['my_model'] assert_file 'app/models/my_model.rb', /MyModel/ end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 5fab233c8d..83de50bbb4 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -158,7 +158,7 @@ class AppGeneratorTest < GeneratorsTestCase end def test_default_namespace - assert_match "rails:generators:app", Rails::Generators::AppGenerator.namespace + assert_match "rails:app", Rails::Generators::AppGenerator.namespace end def test_file_is_added_for_backwards_compatibility diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index e349040fe2..65d7cd2746 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -41,13 +41,13 @@ class GeneratorsTest < GeneratorsTestCase def test_find_by_namespace_with_base klass = Rails::Generators.find_by_namespace(:model, :rails) assert klass - assert_equal "rails:generators:model", klass.namespace + assert_equal "rails:model", klass.namespace end def test_find_by_namespace_with_context klass = Rails::Generators.find_by_namespace(:test_unit, nil, :model) assert klass - assert_equal "test_unit:generators:model", klass.namespace + assert_equal "test_unit:model", klass.namespace end def test_find_by_namespace_with_duplicated_name @@ -65,13 +65,13 @@ class GeneratorsTest < GeneratorsTestCase def test_find_by_namespace_lookup_to_deep_rails_root_folders klass = Rails::Generators.find_by_namespace(:fixjour, :active_record) assert klass - assert_equal "active_record:generators:fixjour", klass.namespace + assert_equal "active_record:fixjour", klass.namespace end def test_find_by_namespace_lookup_traverse_folders klass = Rails::Generators.find_by_namespace(:javascripts, :rails) assert klass - assert_equal "rails:generators:javascripts", klass.namespace + assert_equal "rails:javascripts", klass.namespace end def test_find_by_namespace_lookup_to_vendor_folders @@ -146,14 +146,14 @@ class GeneratorsTest < GeneratorsTestCase Rails::Generators.fallbacks[:remarkable] = :test_unit klass = Rails::Generators.find_by_namespace(:plugin, :remarkable) assert klass - assert_equal "test_unit:generators:plugin", klass.namespace + assert_equal "test_unit:plugin", klass.namespace end def test_fallbacks_for_generators_on_find_by_namespace_with_context Rails::Generators.fallbacks[:remarkable] = :test_unit klass = Rails::Generators.find_by_namespace(:remarkable, :rails, :plugin) assert klass - assert_equal "test_unit:generators:plugin", klass.namespace + assert_equal "test_unit:plugin", klass.namespace end def test_fallbacks_for_generators_on_invoke -- cgit v1.2.3