From 548c72d5d20a75cd1eb0bd4f5e09d8778b31c3a5 Mon Sep 17 00:00:00 2001 From: jomo Date: Sat, 21 Mar 2015 22:04:36 +0100 Subject: [PATCH] adopt some code style --- test/proxy_test.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/proxy_test.rb b/test/proxy_test.rb index e135fed..fecb359 100644 --- a/test/proxy_test.rb +++ b/test/proxy_test.rb @@ -144,10 +144,8 @@ def test_follows_redirects_with_path_only_location_headers def test_forwards_404_with_image spawn_server(:not_found) do |host| - response = RestClient.get(request_uri("http://#{host}/octocat.jpg")) do |response, request, result| - # don't raise on 404 - response - end + uri = request_uri("http://#{host}/octocat.jpg") + response = RestClient.get(uri){ |response, request, result| response } assert_equal(404, response.code) assert_equal("image/jpeg", response.headers[:content_type]) end