summaryrefslogtreecommitdiff
path: root/spec/unit/util/powershell/cmdlet_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/util/powershell/cmdlet_spec.rb')
-rw-r--r--spec/unit/util/powershell/cmdlet_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/util/powershell/cmdlet_spec.rb b/spec/unit/util/powershell/cmdlet_spec.rb
index 144e363979..6969eb3df5 100644
--- a/spec/unit/util/powershell/cmdlet_spec.rb
+++ b/spec/unit/util/powershell/cmdlet_spec.rb
@@ -40,9 +40,9 @@ describe Chef::Util::Powershell::Cmdlet do
%w{! @ # $ % ^ & * & * ( ) - = + \{ \} . ? < > \\ /}.each do |sym|
it "raises an Argument error if it configuration name contains #{sym}" do
- expect do
+ expect {
@cmdlet.send(:validate_switch_name!, "Hello#{sym}")
- end.to raise_error(ArgumentError)
+ }.to raise_error(ArgumentError)
end
end
end
@@ -68,15 +68,15 @@ describe Chef::Util::Powershell::Cmdlet do
describe "#command_switches_string" do
it "raises an ArgumentError if the key is not a symbol" do
- expect do
+ expect {
@cmdlet.send(:command_switches_string, { "foo" => "bar" })
- end.to raise_error(ArgumentError)
+ }.to raise_error(ArgumentError)
end
it "does not allow invalid switch names" do
- expect do
+ expect {
@cmdlet.send(:command_switches_string, { foo!: "bar" })
- end.to raise_error(ArgumentError)
+ }.to raise_error(ArgumentError)
end
it "ignores switches with a false value" do