[Puppet Users] rspec-puppet: let( :title ) isn't setting title

2015-01-09 Thread Chris Galli
I've created a simple module to play with rspec-puppet, and I'm having trouble getting my tests to pass because it appears I can't set the value of $title -- It's always the name of my module. I think perhaps I'm not understanding something about $title in puppet or let( :title ) in rspec-puppe

Re: [Puppet Users] rspec-puppet: let( :title ) isn't setting title

2015-01-09 Thread Stephen Hoekstra
Hi, Change filez from a class to a define ( https://docs.puppetlabs.com/learning/definedtypes.html). Stephen On 9 January 2015 at 23:08, Chris Galli wrote: > I've created a simple module to play with rspec-puppet, and I'm having > trouble getting my tests to pass because it appears I can't set

Re: [Puppet Users] rspec-puppet: let( :title ) isn't setting title

2015-01-10 Thread Gareth Rushgrove
So, as mentioned, the let(:title) method is actually just for defined types: http://rspec-puppet.com/tutorial/#specifying_the_title_of_the_defined_type Given you have a class, title could be coming from a fact, in which case you could use use: let(:facts) { {:title => 'foo'} } Or it should

Re: [Puppet Users] rspec-puppet: let( :title ) isn't setting title

2015-01-12 Thread Chris Galli
> > I'd probably recommend trying to write a test for one of your > real-world puppet modules as I think the issue is with the Puppet code > more than the tests. > Thanks for the feedback and links Stephen and Gareth. Gareth's comment sums things up nicely. I'm dealing a large amount of Pu