Ask Your Question

Rspec and puppet stdlib functions

asked 2014-01-27 06:02:25 -0600

vyacheslav.artyukhov gravatar image

Good day!
I try to test a module that uses stdlib's functions, such as validatearray and validatestring.
But I get following error:

1) ganglia::gmetad with clusters 
 Failure/Error: should include_class('ganglia::gmetad')
   Unknown function validate_array at /home/vyacheslav/gepetto-workspace/modules/ganglia/spec/fixtures/modules/ganglia/manifests/gmetad.pp:52 on node vyacheslav-hp-elitebook-8440p
 # ./spec/classes/gmetad_spec.rb:17:in `block (3 levels) in <top (required)>'

How can I tell to rspec where stdlib's functions are located?

edit retag flag offensive close merge delete


did you fill out the dependencies in the Modulefile?

dgutierrez1287 gravatar imagedgutierrez1287 ( 2014-01-27 09:58:24 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-01-27 11:27:03 -0600

doc75 gravatar image

If you use puppetlabsspec helper, you need to add a .fixtures.yml file that indicates the dependancy:

Hope this helps.

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: 2014-01-27 06:02:25 -0600

Seen: 1,110 times

Last updated: Jan 27 '14