On 4/23/18 4:38 PM, Michael Watters wrote:
> Has anybody used rspec-puppet to run tests using a function that
> requires external ruby gems?  I'm running unit tests on resources that
> call functions in the puppet_thycotic module however rspec is failing
> with an error as shown below.
> 
> Failure/Error: require 'parseconfig'
>      
>      Puppet::PreformattedError:
>        Evaluation Error: Error while evaluating a Function Call, Could
> not autoload puppet/parser/functions/getsecret: cannot load such file --
> parseconfig at
> /home/username/projects/puppet/modules/example/spec/fixtures/modules/example/manifests/hostname.pp:32:20
> on node host.example.com
> 
> I've installed the parseconfig gem using both the gem and puppet_gem
> providers but rspec still complains that it can't find the file.  Any
> idea how to resolve this?  Is there another directory where rspec looks
> for gem packages?
> 

Hi Michael,

Try putting the gem in your Gemfile and using bundler when you invoke
rspec, such as `bundle exec rake spec_standalone` or `bundle exec rspec`.

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8df25700-205c-8a3d-cb1b-b7238dbe43c3%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to