summaryrefslogtreecommitdiff
path: root/spec/unit/http
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-12-08 13:44:59 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-12-08 13:45:29 -0800
commit1b3705ca383b64092c9ef54d7e46201fab6271c7 (patch)
treee14588c68939b80e9cd8c5bf0b0eab4bfddbc96c /spec/unit/http
parent2bdc79409711e836a7698f7b44d171fa7973d4f1 (diff)
downloadchef-1b3705ca383b64092c9ef54d7e46201fab6271c7.tar.gz
Execute and Script Resource improvements
- Warning on incorrect usage of the command resource in any script resource - Warning on code in script resource being nil - Specs added to force deprecation of incorrect usage in Chef-13 - Specs added around the (supported) incorrect usage in Chef-12 - Cleanup+Modernization of providers and specs - Fixed some global state bugs around the Chef::Log.level in the spec tests
Diffstat (limited to 'spec/unit/http')
-rw-r--r--spec/unit/http/validate_content_length_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/unit/http/validate_content_length_spec.rb b/spec/unit/http/validate_content_length_spec.rb
index 34b6a61a3a..79bd539af3 100644
--- a/spec/unit/http/validate_content_length_spec.rb
+++ b/spec/unit/http/validate_content_length_spec.rb
@@ -83,12 +83,17 @@ describe Chef::HTTP::ValidateContentLength do
let(:debug_stream) { StringIO.new }
let(:debug_output) { debug_stream.string }
- before(:each) {
+ before(:each) do
+ @original_log_level = Chef::Log.level
Chef::Log.level = :debug
allow(Chef::Log).to receive(:debug) do |message|
debug_stream.puts message
end
- }
+ end
+
+ after(:each) do
+ Chef::Log.level = @original_log_level
+ end
describe "without response body" do
let(:request_type) { :direct }