I created a small POC module using puppet from master and `puppet module
generate`
I still have rspec-puppet go inside the apt module in fixtures and execute
the tests:
Failures:
1) poc with defaults for all parameters should contain Class[poc]
Failure/Error: it { should contain_class('poc') }
Puppet::Error:
This module only works on Debian or derivatives like Ubuntu at
/Users/otaeguis/projects/src/test-poc/spec/fixtures/modules/apt/manifests/init.pp:43
on node feniixhq.10.208.50.91
# ./spec/classes/init_spec.rb:5:in `block (3 levels) in <top
(required)>'
Here is a link to the puppet module with the POC
https://github.com/feniix/puppet-module-rspec-issue
Appreciate some guidance on how to solve this.
On Wed, Aug 13, 2014 at 10:30 PM, Garrett Honeycutt <[email protected]
> wrote:
> On 8/13/14 9:08 PM, Wil Cooley wrote:
> >
> > On Aug 12, 2014 11:57 AM, "Sebastian Otaegui" <[email protected]
> > <mailto:[email protected]>> wrote:
> >>
> >> Hello all,
> >>
> >> I have created this module:
> >>
> >> https://github.com/Spantree/puppet-thrift and everything worked fine
> > all specs ran fine.
> >>
> >> Now I using the puppetlabs/apt module and when I run the 'rake spec'
> > it is trying to run the 'apt' tests, and it is failing (I think) because
> > I am not providing the appropriate facts.
> >>
> >> Is there a way to ignore the rspecs inside the fixtures/modules/
> > directory?
> >>
> >> I tried to do this:
> >>
> >> require 'rake'
> >> require 'rspec/core/rake_task'
> >>
> >> RSpec::Core::RakeTask.new(:spec) do |t|
> >> t.pattern = 'spec/*/*_spec.rb'
> >> end
> >>
> >> But it didn't work.
> >>
> >
> > How about just:
> >
> > require 'puppetlabs_spec_helper/rake_tasks'
>
> Hi,
>
> +1 to Will Cooley.
>
> When you generate a module with `puppet module generate` it will use
> that single line.
>
>
> https://github.com/puppetlabs/puppet/blob/master/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb
>
> 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/53EC2D3B.1020009%40garretthoneycutt.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Those who do not understand Unix are condemned to reinvent it, poorly.
Any sufficiently recent Microsoft OS contains an ad hoc,
informally-specified, bug-ridden, slow implementation of half of Unix.
--
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/CAApMPgw0aw%3Dvkrr_qd_zkoiQCmHCfbupAzBQzHWh3GeTCBfCvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.