summaryrefslogtreecommitdiff
path: root/spec/unit/resource/powershell_script_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/resource/powershell_script_spec.rb')
-rw-r--r--spec/unit/resource/powershell_script_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/resource/powershell_script_spec.rb b/spec/unit/resource/powershell_script_spec.rb
index 42fcd61a58..16d2d37c9e 100644
--- a/spec/unit/resource/powershell_script_spec.rb
+++ b/spec/unit/resource/powershell_script_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Resource::PowershellScript do
@@ -25,7 +25,7 @@ describe Chef::Resource::PowershellScript do
node.default["kernel"] = Hash.new
node.default["kernel"][:machine] = :x86_64.to_s
- node.automatic[:os] = 'windows'
+ node.automatic[:os] = "windows"
run_context = Chef::RunContext.new(node, nil, nil)
@@ -94,7 +94,7 @@ describe Chef::Resource::PowershellScript do
it "enables convert_boolean_return by default for guards in non-Chef::Resource::Script derived resources when no guard params are specified" do
node = Chef::Node.new
run_context = Chef::RunContext.new(node, nil, nil)
- file_resource = Chef::Resource::File.new('idontexist', run_context)
+ file_resource = Chef::Resource::File.new("idontexist", run_context)
file_resource.guard_interpreter :powershell_script
allow_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:block_from_attributes).with(
@@ -103,21 +103,21 @@ describe Chef::Resource::PowershellScript do
end
it "enables convert_boolean_return by default for guards in the context of powershell_script when guard params are specified" do
- guard_parameters = {:cwd => '/etc/chef', :architecture => :x86_64}
+ guard_parameters = {:cwd => "/etc/chef", :architecture => :x86_64}
allow_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:block_from_attributes).with(
{:convert_boolean_return => true, :code => "$true"}.merge(guard_parameters)).and_return(Proc.new {})
resource.only_if("$true", guard_parameters)
end
it "passes convert_boolean_return as true if it was specified as true in a guard parameter" do
- guard_parameters = {:cwd => '/etc/chef', :convert_boolean_return => true, :architecture => :x86_64}
+ guard_parameters = {:cwd => "/etc/chef", :convert_boolean_return => true, :architecture => :x86_64}
allow_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:block_from_attributes).with(
{:convert_boolean_return => true, :code => "$true"}.merge(guard_parameters)).and_return(Proc.new {})
resource.only_if("$true", guard_parameters)
end
it "passes convert_boolean_return as false if it was specified as true in a guard parameter" do
- other_guard_parameters = {:cwd => '/etc/chef', :architecture => :x86_64}
+ other_guard_parameters = {:cwd => "/etc/chef", :architecture => :x86_64}
parameters_with_boolean_disabled = other_guard_parameters.merge({:convert_boolean_return => false, :code => "$true"})
allow_any_instance_of(Chef::GuardInterpreter::ResourceGuardInterpreter).to receive(:block_from_attributes).with(
parameters_with_boolean_disabled).and_return(Proc.new {})
@@ -129,7 +129,7 @@ describe Chef::Resource::PowershellScript do
let(:resource_instance) { @resource }
let(:resource_instance_name ) { @resource.command }
let(:resource_name) { :powershell_script }
- let(:interpreter_file_name) { 'powershell.exe' }
+ let(:interpreter_file_name) { "powershell.exe" }
it_behaves_like "a Windows script resource"
end