I have written a cookbook to download tomcat (cookbook name = 'my_tomcat'). Resource does everything (resource name 'default.rb') and there is no recipe to it. Other cookbooks will call this resource to download the tomcat.
To test this tomcat cookbook, I have written a test cookbook in test/cookbooks/test/recipes/default.rb and added the dependency in berksfile of my cookbook. When I run kitchen test, it gives me below error-
================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/test/recipes/default.rb
================================================================================
NoMethodError
-------------
No resource or method named `my_tomcat' for `Chef::Recipe "default"'
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/test/recipes/default.rb:3:in `from_file'
Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/test/recipes/default.rb:
1: package 'java-1.7.0-openjdk'
2:
3>> my_tomcat '/apps/tools/apache' do
4: version '7.0.32'
5: end
6:
Please let me know what I am doing wrong here. Do I need to do some more changes anywhere?