diff options
-rw-r--r-- | spec/functional/resource/batch_spec.rb | 14 | ||||
-rw-r--r-- | spec/functional/resource/powershell_spec.rb | 10 |
2 files changed, 14 insertions, 10 deletions
diff --git a/spec/functional/resource/batch_spec.rb b/spec/functional/resource/batch_spec.rb index 1320cc503b..4374dd0730 100644 --- a/spec/functional/resource/batch_spec.rb +++ b/spec/functional/resource/batch_spec.rb @@ -59,16 +59,12 @@ describe Chef::Resource::WindowsScript::Batch, :windows_only do Chef::Resource::WindowsScript::Batch.new("Batch resource functional test", run_context) end - shared_examples_for "a functional batch script resource", :windows_only do + context "when the run action is invoked on Windows" do include_context Chef::Resource::WindowsScript - context "when a Windows script resource run action is invoked " do - it "executes the script code" do - resource.code(script_content + " > #{script_output_path}") - resource.returns(0) - resource.run_action(:run) - end + it "executes the script code" do + resource.code(script_content + " > #{script_output_path}") + resource.returns(0) + resource.run_action(:run) end end - - it_behaves_like "a functional batch script resource" end diff --git a/spec/functional/resource/powershell_spec.rb b/spec/functional/resource/powershell_spec.rb index fc9f97d430..0673e06126 100644 --- a/spec/functional/resource/powershell_spec.rb +++ b/spec/functional/resource/powershell_spec.rb @@ -28,5 +28,13 @@ describe Chef::Resource::WindowsScript::Powershell, :windows_only do r end - it_behaves_like "a functional batch script resource" + include_context Chef::Resource::WindowsScript + + context "when the run action is invoked on Windows" do + it "executes the script code" do + resource.code(script_content + " > #{script_output_path}") + resource.returns(0) + resource.run_action(:run) + end + end end |