diff options
author | Adam Edwards <adamed@opscode.com> | 2014-03-28 16:28:36 -0700 |
---|---|---|
committer | Adam Edwards <adamed@opscode.com> | 2014-03-29 00:21:13 -0700 |
commit | bada8aeb8cdac4779a0d65d4d3fd9333910fc886 (patch) | |
tree | effffe837fe7140c955b6e18f0b5ff28761892c1 /spec/support/shared/unit | |
parent | dfe1ebf9bf59d02aa78c1fdef8787af1665a22fd (diff) | |
download | chef-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.rb | 7 |
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) |