aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-02-07 16:18:09 -0600
committerJoshua Peek <josh@joshpeek.com>2009-02-07 16:18:09 -0600
commit524d8edf68ab94315a128cbd7570d1cf4faf7d7a (patch)
tree9216f1a68194be1bc27a9e83de40205e1c419f4e /actionpack/test
parent0edb0a4facdf6de8d12a004b59232e1006b93cd9 (diff)
downloadrails-524d8edf68ab94315a128cbd7570d1cf4faf7d7a.tar.gz
rails-524d8edf68ab94315a128cbd7570d1cf4faf7d7a.tar.bz2
rails-524d8edf68ab94315a128cbd7570d1cf4faf7d7a.zip
Update bundled Rack for Ruby 1.9 spec changes
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/integration_test.rb2
-rw-r--r--actionpack/test/controller/rack_test.rb6
-rw-r--r--actionpack/test/controller/session/cookie_store_test.rb14
3 files changed, 12 insertions, 10 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 57517e45a7..b3f40fbe95 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -296,7 +296,7 @@ class IntegrationProcessTest < ActionController::IntegrationTest
assert_equal "Gone", status_message
assert_response 410
assert_response :gone
- assert_equal ["cookie_1=; path=/", "cookie_3=chocolate; path=/"], headers["Set-Cookie"]
+ assert_equal "cookie_1=; path=/\ncookie_3=chocolate; path=/", headers["Set-Cookie"]
assert_equal({"cookie_1"=>"", "cookie_2"=>"oatmeal", "cookie_3"=>"chocolate"}, cookies)
assert_equal "Gone", response.body
end
diff --git a/actionpack/test/controller/rack_test.rb b/actionpack/test/controller/rack_test.rb
index 63fa6ab179..b550d3db78 100644
--- a/actionpack/test/controller/rack_test.rb
+++ b/actionpack/test/controller/rack_test.rb
@@ -219,7 +219,7 @@ class RackResponseTest < BaseRackTest
"Content-Type" => "text/html; charset=utf-8",
"Cache-Control" => "private, max-age=0, must-revalidate",
"ETag" => '"65a8e27d8879283831b664bd8b7f0ad4"',
- "Set-Cookie" => [],
+ "Set-Cookie" => "",
"Content-Length" => "13"
}, headers)
@@ -238,7 +238,7 @@ class RackResponseTest < BaseRackTest
"Content-Type" => "text/html; charset=utf-8",
"Cache-Control" => "private, max-age=0, must-revalidate",
"ETag" => '"ebb5e89e8a94e9dd22abf5d915d112b2"',
- "Set-Cookie" => [],
+ "Set-Cookie" => "",
"Content-Length" => "8"
}, headers)
end
@@ -254,7 +254,7 @@ class RackResponseTest < BaseRackTest
assert_equal({
"Content-Type" => "text/html; charset=utf-8",
"Cache-Control" => "no-cache",
- "Set-Cookie" => []
+ "Set-Cookie" => ""
}, headers)
parts = []
diff --git a/actionpack/test/controller/session/cookie_store_test.rb b/actionpack/test/controller/session/cookie_store_test.rb
index 2a04850fc0..c94d7b0915 100644
--- a/actionpack/test/controller/session/cookie_store_test.rb
+++ b/actionpack/test/controller/session/cookie_store_test.rb
@@ -96,7 +96,7 @@ class CookieStoreTest < ActionController::IntegrationTest
with_test_route_set do
get '/set_session_value'
assert_response :success
- assert_equal ["_myapp_session=#{response.body}; path=/; HttpOnly"],
+ assert_equal "_myapp_session=#{response.body}; path=/; HttpOnly",
headers['Set-Cookie']
end
end
@@ -145,7 +145,7 @@ class CookieStoreTest < ActionController::IntegrationTest
with_test_route_set do
get '/no_session_access'
assert_response :success
- assert_equal [], headers['Set-Cookie']
+ assert_equal "", headers['Set-Cookie']
end
end
@@ -155,7 +155,7 @@ class CookieStoreTest < ActionController::IntegrationTest
"fef868465920f415f2c0652d6910d3af288a0367"
get '/no_session_access'
assert_response :success
- assert_equal [], headers['Set-Cookie']
+ assert_equal "", headers['Set-Cookie']
end
end
@@ -164,7 +164,7 @@ class CookieStoreTest < ActionController::IntegrationTest
get '/set_session_value'
assert_response :success
session_payload = response.body
- assert_equal ["_myapp_session=#{response.body}; path=/; HttpOnly"],
+ assert_equal "_myapp_session=#{response.body}; path=/; HttpOnly",
headers['Set-Cookie']
get '/call_reset_session'
@@ -209,7 +209,8 @@ class CookieStoreTest < ActionController::IntegrationTest
assert_response :success
cookie_body = response.body
- assert_equal ["_myapp_session=#{cookie_body}; path=/; expires=#{expected_expiry}; HttpOnly"], headers['Set-Cookie']
+ assert_equal "_myapp_session=#{cookie_body}; path=/; expires=#{expected_expiry}; HttpOnly",
+ headers['Set-Cookie']
# Second request does not access the session
time = Time.local(2008, 4, 25)
@@ -219,7 +220,8 @@ class CookieStoreTest < ActionController::IntegrationTest
get '/no_session_access'
assert_response :success
- assert_equal ["_myapp_session=#{cookie_body}; path=/; expires=#{expected_expiry}; HttpOnly"], headers['Set-Cookie']
+ assert_equal "_myapp_session=#{cookie_body}; path=/; expires=#{expected_expiry}; HttpOnly",
+ headers['Set-Cookie']
end
end