rails/actionpack/test
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
..
activerecord Switch to Rack based session stores. 2008-12-15 16:33:31 -06:00
controller Decorate responses from Rack Middleware and Rails Metal for the purposes of integration testing. A test for the following Metal: 2008-12-17 15:59:47 +01:00
fixtures Fix rendering html partials from an rjs template 2008-12-04 16:35:13 -06:00
template Set template_format to html inside rjs templates so renders within it default to html. 2008-12-04 17:20:51 -06:00
view Fixed ActionView::TestCase current url context [#1561 state:resolved] 2008-12-15 11:47:39 -06:00
abstract_unit.rb Switch to Rack based session stores. 2008-12-15 16:33:31 -06:00
active_record_unit.rb Update AR integration tests for TestCase changes 2008-11-07 15:51:50 -05:00
adv_attr_test.rb Add some tests for adv_attr_accessor. Closes #10633 [fcheung] 2008-01-12 03:06:10 +00:00
testing_sandbox.rb Ruby 1.9 compat: text helper 2007-12-21 11:51:17 +00:00