mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use the new TestCase subclasses in the scaffold and resource generators also. Closes #10174 [bscofield]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
65a29b3433
commit
9f43627d2f
2 changed files with 6 additions and 22 deletions
|
@ -1,15 +1,7 @@
|
|||
require File.dirname(__FILE__) + '<%= '/..' * controller_class_nesting_depth %>/../test_helper'
|
||||
require '<%= controller_file_path %>_controller'
|
||||
require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
|
||||
|
||||
# Re-raise errors caught by the controller.
|
||||
class <%= controller_class_name %>Controller; def rescue_action(e) raise e end; end
|
||||
|
||||
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
|
||||
class <%= controller_class_name %>ControllerTest < ActionController::TestCase
|
||||
tests <%= controller_class_name %>Controller
|
||||
|
||||
# Replace this with your real tests.
|
||||
def test_truth
|
||||
|
|
|
@ -1,15 +1,7 @@
|
|||
require File.dirname(__FILE__) + '<%= '/..' * controller_class_nesting_depth %>/../test_helper'
|
||||
require '<%= controller_file_path %>_controller'
|
||||
require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
|
||||
|
||||
# Re-raise errors caught by the controller.
|
||||
class <%= controller_class_name %>Controller; def rescue_action(e) raise e end; end
|
||||
|
||||
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
|
||||
class <%= controller_class_name %>ControllerTest < ActionController::TestCase
|
||||
tests <%= controller_class_name %>Controller
|
||||
|
||||
def test_should_get_index
|
||||
get :index
|
||||
|
|
Loading…
Reference in a new issue