Hi Felix,

Thank you for your answer, but with my tests it seems that passing Ruby
*nil* value to puppet doesn't result in puppet *undef* value...
This is strange considering that puppet *undef* value results in ruby *nil*
value in templates...

BTW, I've fixed the sample puppet module code (
https://github.com/riton/puppetrspec/commit/febb49cfc949e0a459a96181422e9bd3ee250173)
that has been done too quickly and couldn't work at all.

Cheers

Rémi


On Tue, Apr 22, 2014 at 9:52 AM, Felix Frank <
felix.fr...@alumni.tu-berlin.de> wrote:

> I *would* indeed try
>
>          let :params do
>            { :ensure => nil }
>          end
>
> I would also inline the braces {} as shown because they form a hash in
> this instance, not a block. Aside from that, this spec is very well
> structured. Consider my hat tipped.
>
> Cheers,
> Felix
>
> On 04/18/2014 03:52 PM, Johan De Wit wrote:
> >
> > oops, sorry about that.
> >
> > An undef value in a manifest/class is mapped to 'nil' in the catalog.
> >
> > But I would not allow to have an undef value for the ensure class
> > parameter.   But that's another discussion.
> >
> > I will have a look at the code later on.
> >
> >
> > On 18/04/14 15:16, Remi Ferrand wrote:
> >> ... I'm sorry but I don't understand your answer ...
> >>
> >> I've created a very simple use case here at
> >> https://github.com/riton/puppetrspec
> >>
> >> My question was regarding
> >> file
> https://github.com/riton/puppetrspec/blob/master/spec/classes/puppetrspec_spec.rb
> .
> >> With what value should I replace "# WHAT SHOULD WE USE HERE TO PASS
> >> PUPPET undef VALUE ?#" with to make this unit test functional ?
> >>
> >> Thanks in advance and sorry to ask you to answer again.
> >>
> >> Cheers
> >>
> >> Rémi
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/6nL2eROH8is/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/53561FCE.9070504%40alumni.tu-berlin.de
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMTZwM%2BGMrdj%3D4Hhqij-rdkr1Zip6dM0%3DxLEMnHuGtjP6JO9gQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to