rodjek/rspec-puppet — Issue #22: let(:node) not working
Author: sjahl
Created: 2012-03-02 21:42:59+00:00
State: open

Hi There,

In the documentation, it says that I can specify a node name with:

let(:node) { 'host.example.com' }

However, the tests are failing unless the hostname of the machine I'm testing on, is defined in the puppet manifests/nodes.pp (which is included in site.pp), with the following error:

"Could not find default node or by name with 'test-host.example.com,test-host.example, test-host on node test-host.example.com".

As soon as I add "test-host.example.com" as a node in my puppet's nodes.pp config, the tests pass, which makes me think rspec-puppet is ignoring the let(:node) definition in my spec. Ideas?