Froze rails gems
[depot.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 < Test::Unit::TestCase
15 class MockLogger
16 def method_missing(*args)
17 end
18 end
19
20 def setup
21 @controller = BenchmarkedController.new
22 # benchmark doesn't do anything unless a logger is set
23 @controller.logger = MockLogger.new
24 @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.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