From 175cb7a963a31cf9caecdc40331df4cdc5aa86e2 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 17 Dec 2008 10:10:24 -0600 Subject: Fix metal tests --- actionpack/test/controller/integration_test.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'actionpack/test/controller/integration_test.rb') diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 90afbfb9bc..c28050fe0d 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -374,16 +374,12 @@ class IntegrationProcessTest < ActionController::IntegrationTest end class MetalTest < ActionController::IntegrationTest - require(File.dirname(__FILE__) + "/../../../railties/lib/rails/rack/metal.rb") - - class Poller < ::Rails::Rack::Metal - def call(env) + class Poller + def self.call(env) if env["PATH_INFO"] =~ /^\/success/ [200, {"Content-Type" => "text/plain"}, "Hello World!"] - elsif env["PATH_INFO"] =~ /^\/failure/ - [404, {"Content-Type" => "text/plain"}, ''] else - super + [404, {"Content-Type" => "text/plain"}, ''] end end end -- cgit v1.2.3