class PerformActionTest

Public Instance Methods

test_action_missing_should_work() click to toggle source
# File actionpack/test/controller/base_test.rb, line 171
def test_action_missing_should_work
  use_controller ActionMissingController
  get :arbitrary_action
  assert_equal "Response for arbitrary_action", @response.body
end
test_process_should_be_precise() click to toggle source
# File actionpack/test/controller/base_test.rb, line 163
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) click to toggle source
# File actionpack/test/controller/base_test.rb, line 153
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.host = "www.nextangle.com"
end