require File.dirname(__FILE__) + '/../test_helper' require 'user_controller' # Re-raise errors caught by the controller. class UserController; def rescue_action(e) raise e end; end class UserControllerTest < Test::Unit::TestCase def setup @controller = UserController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new end # Make sure the registration page responds with the proper form. def test_registration_page get :register title = assigns(:title) assert_equal "Register", title assert_response :success assert_template "register" end end