diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-12-17 10:10:24 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-12-17 10:10:24 -0600 |
commit | 175cb7a963a31cf9caecdc40331df4cdc5aa86e2 (patch) | |
tree | 4d81b6cf1d77e28a35c9c2dd254a164fd1df2331 | |
parent | 61a41154f7d50099da371e0d2f22fd25ab9113c2 (diff) | |
download | rails-175cb7a963a31cf9caecdc40331df4cdc5aa86e2.tar.gz rails-175cb7a963a31cf9caecdc40331df4cdc5aa86e2.tar.bz2 rails-175cb7a963a31cf9caecdc40331df4cdc5aa86e2.zip |
Fix metal tests
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 10 |
1 files changed, 3 insertions, 7 deletions
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 |