From b7ea4add86231ef628d479516c8a09ca55e610bc Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 6 Jan 2009 15:20:57 -0600 Subject: Bump Rack version to 0.9 --- actionpack/Rakefile | 2 +- actionpack/lib/action_controller.rb | 2 +- actionpack/test/controller/integration_test.rb | 6 +++--- actionpack/test/controller/rack_test.rb | 7 ++++++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/actionpack/Rakefile b/actionpack/Rakefile index 1a1b908122..c389e5a8d6 100644 --- a/actionpack/Rakefile +++ b/actionpack/Rakefile @@ -81,7 +81,7 @@ spec = Gem::Specification.new do |s| s.requirements << 'none' s.add_dependency('activesupport', '= 2.3.0' + PKG_BUILD) - s.add_dependency('rack', '= 0.4.0') + s.add_dependency('rack', '>= 0.9.0') s.require_path = 'lib' s.autorequire = 'action_controller' diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 98fb490d64..8c022e5625 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -31,7 +31,7 @@ rescue LoadError end end -gem 'rack', '~> 0.4.0' +gem 'rack', '>= 0.9.0' require 'rack' module ActionController diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 53cebf768e..7ac9d97096 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -4,7 +4,7 @@ uses_mocha 'integration' do class SessionTest < Test::Unit::TestCase StubApp = lambda { |env| - [200, {"Content-Type" => "text/html"}, "Hello, World!"] + [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, "Hello, World!"] } def setup @@ -465,9 +465,9 @@ class MetalTest < ActionController::IntegrationTest class Poller def self.call(env) if env["PATH_INFO"] =~ /^\/success/ - [200, {"Content-Type" => "text/plain"}, "Hello World!"] + [200, {"Content-Type" => "text/plain", "Content-Length" => "12"}, "Hello World!"] else - [404, {"Content-Type" => "text/plain"}, ''] + [404, {"Content-Type" => "text/plain", "Content-Length" => "0"}, ''] end end end diff --git a/actionpack/test/controller/rack_test.rb b/actionpack/test/controller/rack_test.rb index 31bff4ae6d..8fd004a9e9 100644 --- a/actionpack/test/controller/rack_test.rb +++ b/actionpack/test/controller/rack_test.rb @@ -236,7 +236,12 @@ class RackResponseTest < BaseRackTest status, headers, body = @response.to_a assert_equal 200, status - assert_equal({"Content-Type" => "text/html; charset=utf-8", "Cache-Control" => "no-cache", "Set-Cookie" => []}, headers) + assert_equal({ + "Content-Type" => "text/html; charset=utf-8", + "Content-Length" => "", + "Cache-Control" => "no-cache", + "Set-Cookie" => [] + }, headers) parts = [] body.each { |part| parts << part } -- cgit v1.2.3 From 84194ce93619f1c74826fae64c1f9745d4014d3a Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 6 Jan 2009 15:35:46 -0800 Subject: Explicitly require AS::TestCase --- actionpack/lib/action_view/test_case.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 1a9ef983a5..65839256aa 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -1,3 +1,5 @@ +require 'active_support/test_case' + module ActionView class Base alias_method :initialize_without_template_tracking, :initialize -- cgit v1.2.3 From 9b96e8d1ccb5b4548896b4100004e6371633f9fb Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 6 Jan 2009 15:36:08 -0800 Subject: Consolidate test_help requires --- railties/lib/test_help.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/railties/lib/test_help.rb b/railties/lib/test_help.rb index b5c92c1790..93ba1bc216 100644 --- a/railties/lib/test_help.rb +++ b/railties/lib/test_help.rb @@ -3,8 +3,7 @@ silence_warnings { RAILS_ENV = "test" } require 'test/unit' -require 'active_support/test_case' -require 'action_controller/test_case' +require 'action_controller/test_process' require 'action_view/test_case' require 'action_controller/integration' require 'action_mailer/test_case' if defined?(ActionMailer) -- cgit v1.2.3 From 8736dd324117af90e0bf120cfd2074b06ccb45eb Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 6 Jan 2009 16:57:41 -0800 Subject: Fix failing flash test --- actionpack/lib/action_controller/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 1093a9bc04..e22114195c 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1350,7 +1350,7 @@ module ActionController #:nodoc: end Base.class_eval do - [ Flash, Filters, Layout, Benchmarking, Rescue, MimeResponds, Helpers, + [ Filters, Layout, Benchmarking, Rescue, Flash, MimeResponds, Helpers, Cookies, Caching, Verification, Streaming, SessionManagement, HttpAuthentication::Basic::ControllerMethods, RecordIdentifier, RequestForgeryProtection, Translation -- cgit v1.2.3