A bit late to the party here, but in my (rspec-puppet) tests I have created
a mock version of the function in a before(:each) block in the unit test
for the class, like this:
before(:each) do
Puppet::Parser::Functions.newfunction(:query_nodes, :type => :rvalue) {
|_| ["foo.example.com",
I was running into the same issue with that module, and I found that
including the puppetdb mock class from the source module helped.
It may be more involved, but at first glance, this helps me quiet a bunch
of the errors to get down to spec testing my actual module.
Garret: I do have dalen-puppetdb in my .fixtures.yaml file. A link to my
project? unfortunately I'm developing all this work inside my client's
cloud and can't provide a link.
On Tue, Nov 1, 2016 at 6:11 PM Peter Berghold
wrote:
> That's what I was beginning to
That's what I was beginning to suspect Andy. Now I have to go find the
Ubuntu version of that
On Tue, Nov 1, 2016 at 5:38 PM Andrew Grimberg
wrote:
> On 11/01/2016 02:25 PM, Garrett Honeycutt wrote:
> > On 11/1/16 4:03 PM, Peter Berghold wrote:
> >> I have a module
On 11/01/2016 02:25 PM, Garrett Honeycutt wrote:
> On 11/1/16 4:03 PM, Peter Berghold wrote:
>> I have a module that I am writing spec tests for that uses the Puppet
>> Forge module cited in the subject line to query for a list of nodes
>> fitting a particular criteria. When I run the spec test
On 11/1/16 4:03 PM, Peter Berghold wrote:
> I have a module that I am writing spec tests for that uses the Puppet
> Forge module cited in the subject line to query for a list of nodes
> fitting a particular criteria. When I run the spec test it bombs out
> with a message: "cannot load such file