summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjamesc <james@opscode.com>2013-07-09 23:38:58 -0700
committerdanielsdeleo <dan@opscode.com>2013-07-10 16:24:31 -0700
commit552ccaeccf22fb01f95aab4536731523312c473e (patch)
tree08b354dc54eb327bfaea0cf00a1430c13e5c15a1
parent1c3783bc793115858c4b401aeb9ee3cd16be27d3 (diff)
downloadchef-552ccaeccf22fb01f95aab4536731523312c473e.tar.gz
update logic so that we don't return dummy values in resource reporter
-rw-r--r--lib/chef/resource_reporter.rb3
-rw-r--r--spec/unit/resource_reporter_spec.rb8
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/chef/resource_reporter.rb b/lib/chef/resource_reporter.rb
index 33d5d2da6a..434150e83d 100644
--- a/lib/chef/resource_reporter.rb
+++ b/lib/chef/resource_reporter.rb
@@ -67,9 +67,6 @@ class Chef
if new_resource.cookbook_name
as_hash["cookbook_name"] = new_resource.cookbook_name
as_hash["cookbook_version"] = new_resource.cookbook_version.version
- else
- as_hash["cookbook_name"] = ""
- as_hash["cookbook_version"] = "0.0.0"
end
as_hash
diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb
index ef513fdfcd..d9f8172539 100644
--- a/spec/unit/resource_reporter_spec.rb
+++ b/spec/unit/resource_reporter_spec.rb
@@ -455,12 +455,12 @@ describe Chef::ResourceReporter do
@first_update_report["result"].should == "create"
end
- it "includes a default (blank) cookbook name" do
- @first_update_report["cookbook_name"].should == ""
+ it "does not include a cookbook name for the resource" do
+ @first_update_report.should_not have_key("cookbook_name")
end
- it "includes a default (0.0.0) cookbook version" do
- @first_update_report["cookbook_version"].should == "0.0.0"
+ it "does not include a cookbook version for the resource" do
+ @first_update_report.should_not have_key("cookbook_version")
end
end