diff options
author | Thiago Pradi <thiago.pradi@gmail.com> | 2015-02-22 23:30:41 -0300 |
---|---|---|
committer | Thiago Pradi <thiago.pradi@gmail.com> | 2015-02-22 23:42:51 -0300 |
commit | 3c181f66a380dc696f1e8846a934b0d314a2bff4 (patch) | |
tree | 24e61ced1823426a919f93eea628686fec00f49f /actionpack | |
parent | 48a0995c7ec6485a227d296c09035ed55ad5ac8b (diff) | |
download | rails-3c181f66a380dc696f1e8846a934b0d314a2bff4.tar.gz rails-3c181f66a380dc696f1e8846a934b0d314a2bff4.tar.bz2 rails-3c181f66a380dc696f1e8846a934b0d314a2bff4.zip |
Removing old helper that was necessary for compatibility with Ruby 1.8.x
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 13 | ||||
-rw-r--r-- | actionpack/test/controller/new_base/metal_test.rb | 6 | ||||
-rw-r--r-- | actionpack/test/controller/new_base/middleware_test.rb | 2 |
3 files changed, 3 insertions, 18 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 8a6e90fdf9..918589f916 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -57,19 +57,6 @@ I18n.backend.store_translations 'pt-BR', {} FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures') -module RackTestUtils - def body_to_string(body) - if body.respond_to?(:each) - str = "" - body.each {|s| str << s } - str - else - body - end - end - extend self -end - SharedTestRoutes = ActionDispatch::Routing::RouteSet.new module ActionDispatch diff --git a/actionpack/test/controller/new_base/metal_test.rb b/actionpack/test/controller/new_base/metal_test.rb index 45a6619eb4..537b93387a 100644 --- a/actionpack/test/controller/new_base/metal_test.rb +++ b/actionpack/test/controller/new_base/metal_test.rb @@ -18,8 +18,6 @@ module MetalTest end class TestMiddleware < ActiveSupport::TestCase - include RackTestUtils - def setup @app = Rack::Builder.new do use MetalTest::MetalMiddleware @@ -31,14 +29,14 @@ module MetalTest env = Rack::MockRequest.env_for("/authed") response = @app.call(env) - assert_equal "Hello World", body_to_string(response[2]) + assert_equal ["Hello World"], response[2] end test "it can return a response using the normal AC::Metal techniques" do env = Rack::MockRequest.env_for("/") response = @app.call(env) - assert_equal "Not authed!", body_to_string(response[2]) + assert_equal ["Not authed!"], response[2] assert_equal 401, response[0] end end diff --git a/actionpack/test/controller/new_base/middleware_test.rb b/actionpack/test/controller/new_base/middleware_test.rb index 6b7b5e10e3..a30e937bb3 100644 --- a/actionpack/test/controller/new_base/middleware_test.rb +++ b/actionpack/test/controller/new_base/middleware_test.rb @@ -75,7 +75,7 @@ module MiddlewareTest test "middleware that is 'use'd is called as part of the Rack application" do result = @app.call(env_for("/")) - assert_equal "Hello World", RackTestUtils.body_to_string(result[2]) + assert_equal ["Hello World"], result[2] assert_equal "Success", result[1]["Middleware-Test"] end |