summaryrefslogtreecommitdiff
path: root/spec/functional/provider
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-10-29 15:14:22 -0700
committerClaire McQuin <claire@getchef.com>2014-10-29 15:59:04 -0700
commit5fed7a65a2f024d964ecf2de1bcf2911cf8a600c (patch)
tree14cc6968e4fe4fd2485c0211088b25c645a80a4b /spec/functional/provider
parentb92c309b0f1aa0837f76ab89d6c81c36076ceca9 (diff)
downloadchef-5fed7a65a2f024d964ecf2de1bcf2911cf8a600c.tar.gz
Update to RSpec 3.
Diffstat (limited to 'spec/functional/provider')
-rwxr-xr-xspec/functional/provider/remote_file/cache_control_data_spec.rb16
-rw-r--r--spec/functional/provider/whyrun_safe_ruby_block_spec.rb4
2 files changed, 10 insertions, 10 deletions
diff --git a/spec/functional/provider/remote_file/cache_control_data_spec.rb b/spec/functional/provider/remote_file/cache_control_data_spec.rb
index 63a4578c69..41f228ae3c 100755
--- a/spec/functional/provider/remote_file/cache_control_data_spec.rb
+++ b/spec/functional/provider/remote_file/cache_control_data_spec.rb
@@ -64,9 +64,9 @@ describe Chef::Provider::RemoteFile::CacheControlData do
it "writes the data to the cache and the same data can be read back" do
cache_control_data.save
saved_cache_control_data = Chef::Provider::RemoteFile::CacheControlData.load_and_validate(uri, file_checksum)
- saved_cache_control_data.etag.should == cache_control_data.etag
- saved_cache_control_data.mtime.should == cache_control_data.mtime
- saved_cache_control_data.checksum.should == cache_control_data.checksum
+ expect(saved_cache_control_data.etag).to eq(cache_control_data.etag)
+ expect(saved_cache_control_data.mtime).to eq(cache_control_data.mtime)
+ expect(saved_cache_control_data.checksum).to eq(cache_control_data.checksum)
end
# Cover the very long remote file path case -- see CHEF-4422 where
@@ -81,17 +81,17 @@ describe Chef::Provider::RemoteFile::CacheControlData do
let(:uri) { uri_exceeds_file_system_limit }
it "writes data to the cache" do
- lambda do
+ expect do
cache_control_data.save
- end.should_not raise_error
+ end.not_to raise_error
end
it "writes the data to the cache and the same data can be read back" do
cache_control_data.save
saved_cache_control_data = Chef::Provider::RemoteFile::CacheControlData.load_and_validate(uri, file_checksum)
- saved_cache_control_data.etag.should == cache_control_data.etag
- saved_cache_control_data.mtime.should == cache_control_data.mtime
- saved_cache_control_data.checksum.should == cache_control_data.checksum
+ expect(saved_cache_control_data.etag).to eq(cache_control_data.etag)
+ expect(saved_cache_control_data.mtime).to eq(cache_control_data.mtime)
+ expect(saved_cache_control_data.checksum).to eq(cache_control_data.checksum)
end
end
diff --git a/spec/functional/provider/whyrun_safe_ruby_block_spec.rb b/spec/functional/provider/whyrun_safe_ruby_block_spec.rb
index 150d46d384..b3c2333e9a 100644
--- a/spec/functional/provider/whyrun_safe_ruby_block_spec.rb
+++ b/spec/functional/provider/whyrun_safe_ruby_block_spec.rb
@@ -44,8 +44,8 @@ describe Chef::Resource::WhyrunSafeRubyBlock do
it "updates the evil laugh, even in why-run mode" do
new_resource.run_action(new_resource.action)
- $evil_global_evil_laugh.should == :mwahahaha
- new_resource.should be_updated
+ expect($evil_global_evil_laugh).to eq(:mwahahaha)
+ expect(new_resource).to be_updated
end
end
end