Ask Your Question
1

Puppet.settings in rspec tests

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

cr3 gravatar image

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

edit retag flag offensive close merge delete

Comments

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 -0500 )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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Stats

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

Seen: 78 times

Last updated: May 24 '13