summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorKartik Null Cating-Subramanian <ksubramanian@chef.io>2016-04-21 13:26:30 -0400
committerKartik Null Cating-Subramanian <ksubramanian@chef.io>2016-04-25 12:04:09 -0400
commit2034305917a76d4c203e457a9ebf61d28819ccbd (patch)
treed43562f4902ab0db80b4178ffefbdff825f4d66f /spec/support
parentd5039e38977b9da431fcb52670576561d772aa27 (diff)
downloadchef-2034305917a76d4c203e457a9ebf61d28819ccbd.tar.gz
Too much log output and unnecessary warnings! Suppress that shit.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/shared/functional/securable_resource.rb2
-rw-r--r--spec/support/shared/unit/provider/file.rb6
-rw-r--r--spec/support/shared/unit/windows_script_resource.rb2
3 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/shared/functional/securable_resource.rb b/spec/support/shared/functional/securable_resource.rb
index dd8a0216bc..506b96736c 100644
--- a/spec/support/shared/functional/securable_resource.rb
+++ b/spec/support/shared/functional/securable_resource.rb
@@ -309,7 +309,7 @@ shared_examples_for "a securable resource without existing target" do
end
it "fails to set owner when owner has invalid characters" do
- expect { resource.owner 'Lance "The Nose" Glindenberry III' }.to raise_error#(Chef::Exceptions::ValidationFailed)
+ expect { resource.owner 'Lance "The Nose" Glindenberry III' }.to raise_error(Chef::Exceptions::ValidationFailed)
end
it "sets owner when owner is specified with a \\" do
diff --git a/spec/support/shared/unit/provider/file.rb b/spec/support/shared/unit/provider/file.rb
index 2b2c7255cc..cb539ffbc3 100644
--- a/spec/support/shared/unit/provider/file.rb
+++ b/spec/support/shared/unit/provider/file.rb
@@ -586,14 +586,14 @@ shared_examples_for Chef::Provider::File do
it "raises an exception when the content object returns a tempfile with a nil path" do
tempfile = double("Tempfile", :path => nil)
expect(provider.send(:content)).to receive(:tempfile).at_least(:once).and_return(tempfile)
- expect { provider.send(:do_contents_changes) }.to raise_error
+ expect { provider.send(:do_contents_changes) }.to raise_error(RuntimeError)
end
it "raises an exception when the content object returns a tempfile that does not exist" do
tempfile = double("Tempfile", :path => "/tmp/foo-bar-baz")
expect(provider.send(:content)).to receive(:tempfile).at_least(:once).and_return(tempfile)
expect(File).to receive(:exists?).with("/tmp/foo-bar-baz").and_return(false)
- expect { provider.send(:do_contents_changes) }.to raise_error
+ expect { provider.send(:do_contents_changes) }.to raise_error(RuntimeError)
end
end
@@ -712,7 +712,7 @@ shared_examples_for Chef::Provider::File do
it "should not try to backup or delete the file, and should not be updated by last action" do
expect(provider).not_to receive(:do_backup)
expect(File).not_to receive(:delete)
- expect { provider.run_action(:delete) }.to raise_error()
+ expect { provider.run_action(:delete) }.to raise_error(Chef::Exceptions::InsufficientPermissions)
expect(resource).not_to be_updated_by_last_action
end
end
diff --git a/spec/support/shared/unit/windows_script_resource.rb b/spec/support/shared/unit/windows_script_resource.rb
index 2dc0229c90..5b559bb83b 100644
--- a/spec/support/shared/unit/windows_script_resource.rb
+++ b/spec/support/shared/unit/windows_script_resource.rb
@@ -64,7 +64,7 @@ shared_examples_for "a Windows script resource" do
it "should raise an exception if the guard_interpreter is overridden from its default value" do
@resource.guard_interpreter :bash
@resource.only_if { true }
- expect { @resource.should_skip?(:run) }.to raise_error
+ expect { @resource.should_skip?(:run) }.to raise_error(ArgumentError)
end
end
end