Skip to content

Commit

Permalink
Use the new TestCase subclasses in the scaffold and resource generato…
Browse files Browse the repository at this point in the history
…rs also. Closes #10174 [bscofield]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Nov 16, 2007
1 parent 65a29b3 commit 9f43627
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
Original file line number Original file line Diff line number Diff line change
@@ -1,15 +1,7 @@
require File.dirname(__FILE__) + '<%= '/..' * controller_class_nesting_depth %>/../test_helper' require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
require '<%= controller_file_path %>_controller'


# Re-raise errors caught by the controller. class <%= controller_class_name %>ControllerTest < ActionController::TestCase
class <%= controller_class_name %>Controller; def rescue_action(e) raise e end; end tests <%= controller_class_name %>Controller
class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase
def setup
@controller = <%= controller_class_name %>Controller.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end


# Replace this with your real tests. # Replace this with your real tests.
def test_truth def test_truth
Expand Down
Original file line number Original file line Diff line number Diff line change
@@ -1,15 +1,7 @@
require File.dirname(__FILE__) + '<%= '/..' * controller_class_nesting_depth %>/../test_helper' require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
require '<%= controller_file_path %>_controller'


# Re-raise errors caught by the controller. class <%= controller_class_name %>ControllerTest < ActionController::TestCase
class <%= controller_class_name %>Controller; def rescue_action(e) raise e end; end tests <%= controller_class_name %>Controller
class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase
def setup
@controller = <%= controller_class_name %>Controller.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end


def test_should_get_index def test_should_get_index
get :index get :index
Expand Down

0 comments on commit 9f43627

Please sign in to comment.