summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-16 09:31:28 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-16 09:31:28 -0700
commitb54426e885ae47c84ef0b13363702255f138edd0 (patch)
tree0c4935826b43a04a61fd105af3a073ece0736db2
parent9a87e0a9dc9d9c119944538ec921678d395cb623 (diff)
downloadchef-b54426e885ae47c84ef0b13363702255f138edd0.tar.gz
Add a unit test to check tagged? method with default node object.sersut/chef-2174
-rw-r--r--spec/unit/recipe_spec.rb8
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")