summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authoradamedx <adamed@opscode.com>2013-02-19 13:49:09 -0800
committeradamedx <adamed@opscode.com>2013-02-19 13:49:09 -0800
commit95a7372e70a66e3b2a9831c6d35bddbd969dd0ce (patch)
treebff0d3ac4bc5a0e9781c5c4e4b39f1e21d3e9aee /spec
parent15304797537e500debacf930c4d7285189ad0609 (diff)
downloadchef-95a7372e70a66e3b2a9831c6d35bddbd969dd0ce.tar.gz
Stop sharing examples across script interpreters
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/resource/batch_spec.rb14
-rw-r--r--spec/functional/resource/powershell_spec.rb10
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