> I found this doing idempotency tests (#2879), but there are apparently
> other ways for external state to leak into this test, as reported by
> James.
>
> --- a/spec/unit/provider/mount/parsed.rb
> +++ b/spec/unit/provider/mount/parsed.rb
> @@ -140,10 +140,12 @@ describe provider_class do
>         end
>
>         it "should write the mount to disk when :flush is called" do
> +            old_text = 
> @provider_class.target_object(@provider_class.default_target).read
> +

I don't understand how this could leak state in or out.  In the before block:

        
@provider_class.stubs(:target_object).returns(Puppet::Util::FileType.filetype(:ram).new("eh"))

so shouldn't it be getting a new, clean whats-it every time?


-----------------------------------------------------------
Life is not so bad if you have plenty of luck, a
good physique and not too much imagination.
—Christopher Isherwood
------------------------------------------------------------

--

You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.


Reply via email to