Hi all, I've grown incredibly frustrated. So I'm trying to write some unit tests for my puppet modules. I've got PDK installed and running. My first test runs, "without params", but my second test fails due to a compilation error. Not sure what the real difference is between the two:
require 'spec_helper' describe 'nuke', type: :class do let(:facts) do { :userprofilepaths_array => ['C:\Users\foobar'] } end context 'with no params' do it { should_not compile } end context 'with nuke product' do let(:params) do { :products => { 'Nuke 9' => { 'version' => '9.0V5', 'package_source' => '/abs/path/to/nuke_installer.exe' } } } end it { should compile } end end The error is: failed: rspec: ./spec/classes/nuke_spec.rb:26: error during compilation: > Evaluation Error: Left match operand must result in a String value. Got an > Undef Value. at > /Users/anthony/repos/puppetdev/nuke/spec/fixtures/modules/nuke/manifests/init.pp:30:7 > > on node anthonymbpro.local > nuke with nuke product should compile into a catalogue without > dependency cycles > Failure/Error: > end > > it { should compile } > end > end > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/582c5017-ef74-4ca8-894b-01ad6dcf5d19%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.