Methods
- L
- S
- T
-
- teardown,
- test_halted_callback,
- test_process_action,
- test_process_action_with_exception_includes_http_status_code,
- test_process_action_with_filter_parameters,
- test_process_action_with_parameters,
- test_process_action_with_rescued_exception_includes_http_status_code,
- test_process_action_with_view_runtime,
- test_process_action_with_with_action_not_found_logs_404,
- test_process_action_with_wrapped_parameters,
- test_process_action_without_parameters,
- test_redirect_to,
- test_send_data,
- test_send_file,
- test_start_processing,
- test_with_fragment_cache,
- test_with_fragment_cache_and_percent_in_key,
- test_with_page_cache
Included Modules
Instance Public methods
logs()
Link
set_logger(logger)
Link
setup()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 68 def setup super @old_logger = ActionController::Base.logger @cache_path = File.expand_path('../temp/test_cache', File.dirname(__FILE__)) ActionController::Base.page_cache_directory = @cache_path @controller.cache_store = :file_store, @cache_path ActionController::LogSubscriber.attach_to :action_controller end
teardown()
Link
test_halted_callback()
Link
test_process_action()
Link
test_process_action_with_exception_includes_http_status_code()
Link
test_process_action_with_filter_parameters()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 141 def test_process_action_with_filter_parameters @request.env["action_dispatch.parameter_filter"] = [:lifo, :amount] get :show, :lifo => 'Pratik', :amount => '420', :step => '1' wait params = logs[1] assert_match(/"amount"=>"\[FILTERED\]"/, params) assert_match(/"lifo"=>"\[FILTERED\]"/, params) assert_match(/"step"=>"1"/, params) end
test_process_action_with_parameters()
Link
test_process_action_with_rescued_exception_includes_http_status_code()
Link
test_process_action_with_view_runtime()
Link
test_process_action_with_with_action_not_found_logs_404()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 232 def test_process_action_with_with_action_not_found_logs_404 begin get :with_action_not_found wait rescue AbstractController::ActionNotFound end assert_equal 2, logs.size assert_match(/Completed 404/, logs.last) end
test_process_action_with_wrapped_parameters()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 126 def test_process_action_with_wrapped_parameters @request.env['CONTENT_TYPE'] = 'application/json' post :show, :id => '10', :name => 'jose' wait assert_equal 3, logs.size assert_match '"person"=>{"name"=>"jose"}', logs[1] end
test_process_action_without_parameters()
Link
test_redirect_to()
Link
test_send_data()
Link
test_send_file()
Link
test_start_processing()
Link
test_with_fragment_cache()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 178 def test_with_fragment_cache @controller.config.perform_caching = true get :with_fragment_cache wait assert_equal 4, logs.size assert_match(/Read fragment views\/foo/, logs[1]) assert_match(/Write fragment views\/foo/, logs[2]) ensure @controller.config.perform_caching = true end
test_with_fragment_cache_and_percent_in_key()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 190 def test_with_fragment_cache_and_percent_in_key @controller.config.perform_caching = true get :with_fragment_cache_and_percent_in_key wait assert_equal 4, logs.size assert_match(/Read fragment views\/foo/, logs[1]) assert_match(/Write fragment views\/foo/, logs[2]) ensure @controller.config.perform_caching = true end
test_with_page_cache()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 202 def test_with_page_cache @controller.config.perform_caching = true get :with_page_cache wait assert_equal 3, logs.size assert_match(/Write page/, logs[1]) assert_match(/\/index\.html/, logs[1]) ensure @controller.config.perform_caching = true end