aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-02-07 16:44:27 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-02-07 16:44:27 -0800
commitea25224046679ac0d68f3c987c78ebafa491cee5 (patch)
treecc4c422e8fc3be60990b4de0687250f5997cd1a7 /actionpack/test/dispatch
parent08ef06dbf1273fc09d6e23b7d8727928717e8004 (diff)
downloadrails-ea25224046679ac0d68f3c987c78ebafa491cee5.tar.gz
rails-ea25224046679ac0d68f3c987c78ebafa491cee5.tar.bz2
rails-ea25224046679ac0d68f3c987c78ebafa491cee5.zip
cleaning up some warnings on 1.9.3
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/request_test.rb2
-rw-r--r--actionpack/test/dispatch/response_test.rb10
-rw-r--r--actionpack/test/dispatch/session/cookie_store_test.rb1
3 files changed, 6 insertions, 7 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb
index 75b674ec1a..dd5bf5ec2d 100644
--- a/actionpack/test/dispatch/request_test.rb
+++ b/actionpack/test/dispatch/request_test.rb
@@ -427,7 +427,7 @@ class RequestTest < ActiveSupport::TestCase
begin
request = stub_request(mock_rack_env)
request.parameters
- rescue TypeError => e
+ rescue TypeError
# rack will raise a TypeError when parsing this query string
end
assert_equal({}, request.parameters)
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb
index ab26d1a645..6f38714b2e 100644
--- a/actionpack/test/dispatch/response_test.rb
+++ b/actionpack/test/dispatch/response_test.rb
@@ -18,7 +18,7 @@ class ResponseTest < ActiveSupport::TestCase
body.each { |part| parts << part }
assert_equal ["Hello, World!"], parts
end
-
+
test "status handled properly in initialize" do
assert_equal 200, ActionDispatch::Response.new('200 OK').status
end
@@ -26,7 +26,7 @@ class ResponseTest < ActiveSupport::TestCase
test "utf8 output" do
@response.body = [1090, 1077, 1089, 1090].pack("U*")
- status, headers, body = @response.to_a
+ status, headers, _ = @response.to_a
assert_equal 200, status
assert_equal({
"Content-Type" => "text/html; charset=utf-8"
@@ -52,20 +52,20 @@ class ResponseTest < ActiveSupport::TestCase
test "content type" do
[204, 304].each do |c|
@response.status = c.to_s
- status, headers, body = @response.to_a
+ _, headers, _ = @response.to_a
assert !headers.has_key?("Content-Type"), "#{c} should not have Content-Type header"
end
[200, 302, 404, 500].each do |c|
@response.status = c.to_s
- status, headers, body = @response.to_a
+ _, headers, _ = @response.to_a
assert headers.has_key?("Content-Type"), "#{c} did not have Content-Type header"
end
end
test "does not include Status header" do
@response.status = "200 OK"
- status, headers, body = @response.to_a
+ _, headers, _ = @response.to_a
assert !headers.has_key?('Status')
end
diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb
index 256d0781c7..27f55fd7ab 100644
--- a/actionpack/test/dispatch/session/cookie_store_test.rb
+++ b/actionpack/test/dispatch/session/cookie_store_test.rb
@@ -194,7 +194,6 @@ class CookieStoreTest < ActionDispatch::IntegrationTest
with_test_route_set do
get '/set_session_value'
assert_response :success
- session_payload = response.body
assert_equal "_myapp_session=#{response.body}; path=/; HttpOnly",
headers['Set-Cookie']