diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-17 12:15:26 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-17 13:25:02 -0700 |
commit | a0c32511bc6634538374ca4b433032b8acd05f96 (patch) | |
tree | 15c7cfbd0d773488ab814e7c24f0c58505c9134b /spec/unit/http | |
parent | 3d0379a2ad531a0b3db5ed2827bf30ef07b26100 (diff) | |
download | chef-a0c32511bc6634538374ca4b433032b8acd05f96.tar.gz |
fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgrade
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/http')
-rw-r--r-- | spec/unit/http/validate_content_length_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/unit/http/validate_content_length_spec.rb b/spec/unit/http/validate_content_length_spec.rb index 85f8d92f78..5067d36d38 100644 --- a/spec/unit/http/validate_content_length_spec.rb +++ b/spec/unit/http/validate_content_length_spec.rb @@ -37,25 +37,25 @@ describe Chef::HTTP::ValidateContentLength do let(:content_length_value) { 23 } let(:streaming_length) { 23 } let(:response_body) { "Thanks for checking in." } - let(:response_headers) { + let(:response_headers) do { "content-length" => content_length_value, } - } + end - let(:response) { + let(:response) do m = double("HttpResponse", :body => response_body) allow(m).to receive(:[]) do |key| response_headers[key] end m - } + end - let(:middleware) { + let(:middleware) do client = TestClient.new(url) client.middlewares[0] - } + end def run_content_length_validation stream_handler = middleware.stream_response_handler(response) @@ -169,12 +169,12 @@ describe Chef::HTTP::ValidateContentLength do end describe "when Transfer-Encoding & Content-Length is set" do - let(:response_headers) { + let(:response_headers) do { "content-length" => content_length_value, "transfer-encoding" => "chunked", } - } + end %w{direct streaming}.each do |req_type| describe "when running #{req_type} request" do |