From 2cc0cac3efce92bf9d0e8636f2889c37ca9f57ab Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 26 Oct 2007 02:21:21 +0000 Subject: Introduce TestCase subclasses for testing rails applications allowing tests to be DRY'd up a bit and to provide a path toward tidying up our monkeypatching of test/unit. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../components/controller/templates/functional_test.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb') diff --git a/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb b/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb index abe9c4cf8c..202a017a40 100644 --- a/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +++ b/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb @@ -1,15 +1,7 @@ require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper' -require '<%= file_path %>_controller' -# Re-raise errors caught by the controller. -class <%= class_name %>Controller; def rescue_action(e) raise e end; end - -class <%= class_name %>ControllerTest < Test::Unit::TestCase - def setup - @controller = <%= class_name %>Controller.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - end +class <%= class_name %>ControllerTest < ActionController::TestCase + tests <%= class_name %>Controller # Replace this with your real tests. def test_truth -- cgit v1.2.3