From b54426e885ae47c84ef0b13363702255f138edd0 Mon Sep 17 00:00:00 2001 From: Serdar Sutay Date: Thu, 16 Oct 2014 09:31:28 -0700 Subject: Add a unit test to check tagged? method with default node object. --- spec/unit/recipe_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec') 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") -- cgit v1.2.1