diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-16 09:31:28 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-16 09:31:28 -0700 |
commit | b54426e885ae47c84ef0b13363702255f138edd0 (patch) | |
tree | 0c4935826b43a04a61fd105af3a073ece0736db2 /spec/unit/recipe_spec.rb | |
parent | 9a87e0a9dc9d9c119944538ec921678d395cb623 (diff) | |
download | chef-b54426e885ae47c84ef0b13363702255f138edd0.tar.gz |
Add a unit test to check tagged? method with default node object.sersut/chef-2174
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 5b6f3ea55b..101c722052 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -423,6 +423,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") |