Is there a way I can use a custom fact while using rspec? My module works fine and the custom fact exists and works as intended when I do a puppet run on my agent, but when I try to use the same fact in rspec I get the following error:
Failure/Error: it { should contain_class('zabbixconfig') }
Puppet::PreformattedError:
Evaluation Error: Unknown variable: 'pskkey_generate'. at /etc/puppetlabs/code/environments/production/modules/zabbixconfig/spec/fixtures/modules/zabbixconfig/manifests/init.pp:46:13 on node puppet-master-poc
The pskkey_generate
in the error above is my custom fact, and here's a snippet of my class including it:
$pskkey = $pskkey_generate
Does anyone know how to get rspec to recognize my custom fact? Any help would be appreciated.