diff options
-rw-r--r-- | spec/functional/http/simple_spec.rb | 8 | ||||
-rw-r--r-- | spec/functional/rest_spec.rb | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/functional/http/simple_spec.rb b/spec/functional/http/simple_spec.rb index 9afd57e93f..bef7b6e43d 100644 --- a/spec/functional/http/simple_spec.rb +++ b/spec/functional/http/simple_spec.rb @@ -38,10 +38,10 @@ describe Chef::HTTP::Simple do it "successfully downloads a streaming request" do tempfile = http_client.streaming_request(source, {}) tempfile.close - Digest::MD5.hexdigest(binread(tempfile.path)).should == Digest::MD5.hexdigest(expected_content) + expect(Digest::MD5.hexdigest(binread(tempfile.path))).to eq(Digest::MD5.hexdigest(expected_content)) end it "successfully does a non-streaming GET request" do - Digest::MD5.hexdigest(http_client.get(source)).should == Digest::MD5.hexdigest(expected_content) + expect(Digest::MD5.hexdigest(http_client.get(source))).to eq(Digest::MD5.hexdigest(expected_content)) end end @@ -68,12 +68,12 @@ describe Chef::HTTP::Simple do it "fails with a Net::HTTPServerException for a streaming request" do tempfile = http_client.streaming_request(source) tempfile.close - Digest::MD5.hexdigest(binread(tempfile.path)).should == Digest::MD5.hexdigest(expected_content) + expect(Digest::MD5.hexdigest(binread(tempfile.path))).to eq(Digest::MD5.hexdigest(expected_content)) expect { http_client.streaming_request(source2) }.to raise_error(Net::HTTPServerException) end it "fails with a Net::HTTPServerException for a GET request" do - Digest::MD5.hexdigest(http_client.get(source)).should == Digest::MD5.hexdigest(expected_content) + expect(Digest::MD5.hexdigest(http_client.get(source))).to eq(Digest::MD5.hexdigest(expected_content)) expect { http_client.get(source2) }.to raise_error(Net::HTTPServerException) end end diff --git a/spec/functional/rest_spec.rb b/spec/functional/rest_spec.rb index 195a00d957..84d660abc5 100644 --- a/spec/functional/rest_spec.rb +++ b/spec/functional/rest_spec.rb @@ -30,7 +30,7 @@ describe Chef::REST do it "successfully downloads a streaming request" do tempfile = http_client.streaming_request(source, {}) tempfile.close - Digest::MD5.hexdigest(binread(tempfile.path)).should == Digest::MD5.hexdigest(expected_content) + expect(Digest::MD5.hexdigest(binread(tempfile.path))).to eq(Digest::MD5.hexdigest(expected_content)) end end @@ -50,7 +50,7 @@ describe Chef::REST do it "fails with a Net::HTTPServerException" do tempfile = http_client.streaming_request(source, {}) tempfile.close - Digest::MD5.hexdigest(binread(tempfile.path)).should == Digest::MD5.hexdigest(expected_content) + expect(Digest::MD5.hexdigest(binread(tempfile.path))).to eq(Digest::MD5.hexdigest(expected_content)) expect { http_client.streaming_request(source2, {}) }.to raise_error(Net::HTTPServerException) end end |