Updated README.rdoc again
[feedcatcher.git] / vendor / rails / actionpack / test / controller / benchmark_test.rb
1 require 'abstract_unit'
2
3 # Provide some static controllers.
4 class BenchmarkedController < ActionController::Base
5 def public_action
6 render :nothing => true
7 end
8
9 def rescue_action(e)
10 raise e
11 end
12 end
13
14 class BenchmarkTest < ActionController::TestCase
15 tests BenchmarkedController
16
17 class MockLogger
18 def method_missing(*args)
19 end
20 end
21
22 def setup
23 # benchmark doesn't do anything unless a logger is set
24 @controller.logger = MockLogger.new
25 @request.host = "test.actioncontroller.i"
26 end
27
28 def test_with_http_1_0_request
29 @request.host = nil
30 assert_nothing_raised { get :public_action }
31 end
32 end