Files
rails/actionpack/lib/action_controller
Jesse Newland 97a178bfa4 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>
2008-12-17 15:59:47 +01:00
..
2008-12-07 03:27:53 +01:00
2008-12-16 19:56:09 -06:00
2008-12-09 11:17:11 -08:00
2008-12-16 01:00:48 -06:00
2008-11-24 12:17:07 -06:00
2008-12-09 11:17:11 -08:00
2008-12-07 03:27:53 +01:00
2008-12-07 03:27:53 +01:00
2008-07-16 13:01:23 +01:00
2008-12-16 01:00:48 -06:00
2008-07-28 12:33:24 +01:00