diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-25 13:19:27 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-25 17:28:10 +0200 |
commit | 49c3ad7f7782274504fbe0818b9636d2b362a1a3 (patch) | |
tree | b19530b21d45bcd298bb7147cfae0fda03156b27 /railties/lib/rails | |
parent | 51f1f550dab47c6ec3dcdba7b153258e2a0feb69 (diff) | |
download | rails-49c3ad7f7782274504fbe0818b9636d2b362a1a3.tar.gz rails-49c3ad7f7782274504fbe0818b9636d2b362a1a3.tar.bz2 rails-49c3ad7f7782274504fbe0818b9636d2b362a1a3.zip |
Add namespace for test_unit generators
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/lib/rails')
3 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb index 0d4185846d..11a73ebad7 100644 --- a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb +++ b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb @@ -1,5 +1,6 @@ require 'test_helper' +<% module_namespacing do -%> class <%= class_name %>ControllerTest < ActionController::TestCase <% if actions.empty? -%> # Replace this with your real tests. @@ -16,3 +17,4 @@ class <%= class_name %>ControllerTest < ActionController::TestCase <% end -%> <% end -%> end +<% end -%> diff --git a/railties/lib/rails/generators/test_unit/helper/templates/helper_test.rb b/railties/lib/rails/generators/test_unit/helper/templates/helper_test.rb index 591e40900e..7d37bda0f9 100644 --- a/railties/lib/rails/generators/test_unit/helper/templates/helper_test.rb +++ b/railties/lib/rails/generators/test_unit/helper/templates/helper_test.rb @@ -1,4 +1,6 @@ require 'test_helper' +<% module_namespacing do -%> class <%= class_name %>HelperTest < ActionView::TestCase end +<% end -%> diff --git a/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb b/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb index 3e0bc29d3a..6f79879838 100644 --- a/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb +++ b/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb @@ -1,8 +1,10 @@ require 'test_helper' +<% module_namespacing do -%> class <%= class_name %>Test < ActiveSupport::TestCase # Replace this with your real tests. test "the truth" do assert true end end +<% end -%> |