aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/benchmarking.rb
diff options
context:
space:
mode:
authorJesse Newland <jnewland@gmail.com>2008-12-17 09:21:20 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-12-17 15:59:47 +0100
commit97a178bfa4d5101dca73ae931cc9c77385d8c97e (patch)
tree0b7989afbc55ccdb4654de8c6b7eeb577de4ded3 /actionpack/lib/action_controller/benchmarking.rb
parent1bcfce0130d4fa13d56f58d5cd5e0f5de33e015f (diff)
downloadrails-97a178bfa4d5101dca73ae931cc9c77385d8c97e.tar.gz
rails-97a178bfa4d5101dca73ae931cc9c77385d8c97e.tar.bz2
rails-97a178bfa4d5101dca73ae931cc9c77385d8c97e.zip
Decorate responses from Rack Middleware and Rails Metal for the purposes of integration testing. A test for the following Metal:
class Poller < Rails::Rack::Metal def call(env) if env["PATH_INFO"] =~ /^\/poller/ [200, {"Content-Type" => "text/plain"}, "Hello World!"] else super end end end might be tested like so: class PollerTest < ActionController::IntegrationTest test "poller returns hello world" do get "/poller" assert_response 200 assert_response :success assert_response :ok assert_equal "Hello World!", response.body end end [#1588 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'actionpack/lib/action_controller/benchmarking.rb')
0 files changed, 0 insertions, 0 deletions