summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/cookbook/cookbook_version_loader.rb2
-rw-r--r--spec/unit/cookbook_loader_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
index a990489ff6..77db236eca 100644
--- a/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/lib/chef/cookbook/cookbook_version_loader.rb
@@ -107,7 +107,7 @@ class Chef
raise RuntimeError, "Invalid metadata file: #{metadata_file} for cookbook: #{cookbook_version}"
end
end
- Chef::Log.warn "Inferred cookbook names are deprecated, please set a name in metadata" unless @metadata.name
+ Chef::Log.warn "Inferring cookbook name from directory name (#@cookbook_pathname) is deprecated, please set a name in the metadata." unless @metadata.name
@metadata
end
diff --git a/spec/unit/cookbook_loader_spec.rb b/spec/unit/cookbook_loader_spec.rb
index 5bd7b62183..17e189cd6c 100644
--- a/spec/unit/cookbook_loader_spec.rb
+++ b/spec/unit/cookbook_loader_spec.rb
@@ -172,7 +172,7 @@ describe Chef::CookbookLoader do
end
it "should emit deprecation warning if name is not in metadata" do
- Chef::Log.should_receive(:warn).exactly(6).with("Inferred cookbook names are deprecated, please set a name in metadata")
+ Chef::Log.should_receive(:warn).exactly(6).with(/Inferring cookbook name from directory name \([^)]+\) is deprecated, please set a name in the metadata./)
@cookbook_loader.load_cookbooks
end
end # load_cookbooks