Methods
T
U
Instance Public methods
test_action_missing_should_work()
# File actionpack/test/controller/base_test.rb, line 186
def test_action_missing_should_work
  use_controller ActionMissingController
  get :arbitrary_action
  assert_equal "Response for arbitrary_action", @response.body
end
test_get_on_hidden_should_fail()
# File actionpack/test/controller/base_test.rb, line 180
def test_get_on_hidden_should_fail
  use_controller NonEmptyController
  assert_raise(AbstractController::ActionNotFound) { get :hidden_action }
  assert_raise(AbstractController::ActionNotFound) { get :another_hidden_action }
end
test_process_should_be_precise()
# File actionpack/test/controller/base_test.rb, line 172
def test_process_should_be_precise
  use_controller EmptyController
  exception = assert_raise AbstractController::ActionNotFound do
    get :non_existent
  end
  assert_equal "The action 'non_existent' could not be found for EmptyController", exception.message
end
use_controller(controller_class)
# File actionpack/test/controller/base_test.rb, line 160
def use_controller(controller_class)
  @controller = controller_class.new

  # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
  # a more accurate simulation of what happens in "real life".
  @controller.logger = ActiveSupport::Logger.new(nil)

  @request     = ActionController::TestRequest.new
  @response    = ActionController::TestResponse.new
  @request.host = "www.nextangle.com"
end