diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-16 11:26:26 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-16 11:26:26 -0700 |
commit | 63d0d19723b77c6e29a01f897ffed34432a35584 (patch) | |
tree | 0935175ff78c105a5cdad0f770a5f4e010a2bab9 /spec/unit/recipe_spec.rb | |
parent | fa3e81ecd2df09afa4b9de2e4e95d3b637ee9641 (diff) | |
parent | b54426e885ae47c84ef0b13363702255f138edd0 (diff) | |
download | chef-63d0d19723b77c6e29a01f897ffed34432a35584.tar.gz |
Merge pull request #2238 from opscode/sersut/chef-2174
Return correct value for tagged? when node[:tags] is nil.
Diffstat (limited to 'spec/unit/recipe_spec.rb')
-rw-r--r-- | spec/unit/recipe_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index e29ad47045..cb7581b5fb 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -434,6 +434,14 @@ describe Chef::Recipe do end describe "tags" do + describe "with the default node object" do + let(:node) { Chef::Node.new } + + it "should return false for any tags" do + recipe.tagged?("foo").should be(false) + end + end + it "should set tags via tag" do recipe.tag "foo" node[:tags].should include("foo") |