Methods
- T
- U
Instance Public methods
test_action_missing_should_work()
Link
Source: | on GitHub
test_get_on_priv_should_show_selector()
Link
# File actionpack/test/controller/base_test.rb, line 172 def test_get_on_priv_should_show_selector use_controller MethodMissingController assert_deprecated(/Using `method_missing` to handle .* use `action_missing` instead/) do get :shouldnt_be_called end assert_response :success assert_equal 'shouldnt_be_called', @response.body end
test_method_missing_is_not_an_action_name()
Link
# File actionpack/test/controller/base_test.rb, line 181 def test_method_missing_is_not_an_action_name use_controller MethodMissingController assert !@controller.__send__(:action_method?, 'method_missing') assert_deprecated(/Using `method_missing` to handle .* use `action_missing` instead/) do get :method_missing end assert_response :success assert_equal 'method_missing', @response.body end
test_method_missing_should_recieve_symbol()
Link
# File actionpack/test/controller/base_test.rb, line 192 def test_method_missing_should_recieve_symbol use_controller AnotherMethodMissingController assert_deprecated(/Using `method_missing` to handle .* use `action_missing` instead/) do get :some_action end assert_kind_of NameError, @controller._exception end
test_process_should_be_precise()
Link
# File actionpack/test/controller/base_test.rb, line 164 def test_process_should_be_precise use_controller EmptyController exception = assert_raise AbstractController::ActionNotFound do get :non_existent end assert_equal exception.message, "The action 'non_existent' could not be found for EmptyController" end
use_controller(controller_class)
Link
# File actionpack/test/controller/base_test.rb, line 152 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 = Logger.new(nil) @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @request.host = "www.nextangle.com" end