提交 dabf20d5 编写于 作者: Y Yehuda Katz

Sync 'rails/rails/master'

......@@ -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'
......
......@@ -31,7 +31,7 @@
end
end
gem 'rack', '~> 0.4.0'
gem 'rack', '>= 0.9.0'
require 'rack'
module ActionController
......
......@@ -1350,7 +1350,7 @@ def process_cleanup
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
......
require 'active_support/test_case'
module ActionView
class Base
alias_method :initialize_without_template_tracking, :initialize
......
......@@ -4,7 +4,7 @@
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
......
......@@ -236,7 +236,12 @@ def test_streaming_block
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 }
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册