summaryrefslogtreecommitdiff
path: root/spec/unit/resource/script_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-05-16 12:48:05 -0700
committerTim Smith <tsmith@chef.io>2018-05-16 12:48:35 -0700
commitf3b34f2ad21934b060a95ac59f1573cea7217124 (patch)
tree266a6a950c7b2ef08bf93be4da41ab769267cd6f /spec/unit/resource/script_spec.rb
parentb69877bb0f1b2aec99f9c0a392d064e2b0d21bda (diff)
downloadchef-test_defaults.tar.gz
Add resource specs round 1test_defaults
Auto generated from the resource inspector Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/resource/script_spec.rb')
-rw-r--r--spec/unit/resource/script_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/resource/script_spec.rb b/spec/unit/resource/script_spec.rb
index 554d99710e..3306ddb666 100644
--- a/spec/unit/resource/script_spec.rb
+++ b/spec/unit/resource/script_spec.rb
@@ -24,6 +24,14 @@ describe Chef::Resource::Script do
let(:script_resource) { Chef::Resource::Script.new(resource_instance_name) }
let(:resource_name) { :script }
+ it "sets the default action as :run" do
+ expect(script_resource.action).to eql([:run])
+ end
+
+ it "supports :run action" do
+ expect { script_resource.action :run }.not_to raise_error
+ end
+
it "accepts a string for the interpreter" do
script_resource.interpreter "naaaaNaNaNaaNaaNaaNaa"
expect(script_resource.interpreter).to eql("naaaaNaNaNaaNaaNaaNaa")