On Thursday, November 1, 2012 at 2:53 PM, Bryan Berry wrote:
erm, how about this for resource "foo"?require 'minitest/chef' # or require 'minitest-chef' ??MiniTest::Chef::Resources.register_resource(:foo)or if that doesn't work, re-opening the modulemodule MiniTestmodule Chefmodule Resourcesregister_resource(:foo)endendendjust an ideaOn Thu, Nov 1, 2012 at 10:34 PM, David Petzel < "> > wrote:Any chance, someone has any advice for me on this? I've restored to doing asystem call and gem list as a totally hack workaround, given the multitudeof ways it could not work right, but my ruby skillz are not top notch, andI'm struggling to understand how I might expose the resource for testinglike shown below.Any advice at all would be greatly appreciated.ThanksOn Wed, Oct 31, 2012 at 11:36 AM, < "> > wrote:Sorry if this is a dumb question, but I'm not having much luck in findingananswer.I've been using minitests for a short while now in my recipes, so I have abasic understanding of how it works. What I'm trying to figure out is howtotest a resource that is not one of the pre-defined ones here:Specifically what I'm trying to do is something like:chef_gem("blah").must_be_installedWhats the best/proper way to be able to that? I tried the above, and it ofcourse didn't work. I was also trying to see if I could use thepre-definedpackage resource and specify the provider, like you might do in a recipe,without success.
Archive powered by MHonArc 2.6.16.