Ask Your Question

Puppet.settings in rspec tests

asked 2013-05-22 08:29:54 -0600

cr3 gravatar image

How can the Puppet.settings, also referenced as $::settings, be defined in rspec tests?

edit retag flag offensive close merge delete


Can you explain what you're trying to accomplish? Not sure if it's a good idea but maybe i'm wrong.

Daniel gravatar imageDaniel ( 2013-05-23 04:27:38 -0600 )edit

I'm using $::settings::config in a template, so I'd like to test that it's being used correctly as in: it { should contain_file('/path/of/file').with_content(/settings_pattern/) }

cr3 gravatar imagecr3 ( 2013-05-23 08:31:36 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-24 04:15:40 -0600

Have you tried to "fake" a fact named settings? Inside your template facts and global vars act in the exact same way.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-05-22 08:29:54 -0600

Seen: 83 times

Last updated: May 24 '13