summaryrefslogtreecommitdiff
path: root/spec/support/shared/unit
diff options
context:
space:
mode:
authorAdam Edwards <adamed@opscode.com>2014-03-28 16:28:36 -0700
committerAdam Edwards <adamed@opscode.com>2014-03-29 00:21:13 -0700
commitbada8aeb8cdac4779a0d65d4d3fd9333910fc886 (patch)
treeeffffe837fe7140c955b6e18f0b5ff28761892c1 /spec/support/shared/unit
parentdfe1ebf9bf59d02aa78c1fdef8787af1665a22fd (diff)
downloadchef-bada8aeb8cdac4779a0d65d4d3fd9333910fc886.tar.gz
CR feedback: move inheritance to class level, add tests for convert_boolean_true
Diffstat (limited to 'spec/support/shared/unit')
-rw-r--r--spec/support/shared/unit/script_resource.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/shared/unit/script_resource.rb b/spec/support/shared/unit/script_resource.rb
index add99d45bd..7cdd117e40 100644
--- a/spec/support/shared/unit/script_resource.rb
+++ b/spec/support/shared/unit/script_resource.rb
@@ -63,6 +63,13 @@ shared_examples_for "a script resource" do
resource.code 'echo hi'
end
+ it "inherits exactly the :cwd, :environment, :group, :path, :user, and :umask attributes from a parent resource class" do
+ inherited_difference = Chef::Resource::Script.guard_inherited_attributes -
+ [:cwd, :environment, :group, :path, :user, :umask ]
+
+ inherited_difference.should == []
+ end
+
it "when guard_interpreter is set to the default value, the guard command string should be evaluated by command execution and not through a resource" do
Chef::Resource::Conditional.any_instance.should_not_receive(:evaluate_block)
Chef::Resource::Conditional.any_instance.should_receive(:evaluate_command).and_return(true)