On Thu, Mar 17, 2011 at 09:07, Mark Phillips <m...@vntx.cc> wrote:
> On 17 Mar 2011, at 05:42, James Turnbull wrote:
>> Dominic Cleal wrote:
>>> Nobody has been looking at it, it would be great if you and Mark want to
>>> and I'd be happy to help.  I haven't even seen any examples of pkgutil
>>> catalogs with multiple versions, so it'd be good to check it copes
>>> properly in its current form too.  (Unit tests!)
>>>
>>> I think it's best to first collect some evidence about the output format
>>> of pkgutil with multiple versions and what's possible compared to say
>>> yum, then work out how to integrate that into the provider.
>>
>> And tests.  Tests are always awesome. :)
>
> And on that subject James, do Puppetlabs have any recommendations for
> testing - types of evidence, frameworks, etc. My only experience is Perl
> Test::More and the likes, if you've any tips on what we could produce for
> Puppet/Ruby that'd be great.

The tests under spec/unit are where we are pushing new testing effort.
 The pattern for implementation file to spec file is pretty simple,
and should be fairly obvious.  Depending, there may or may not be an
existing test file, but we do try hard to add more as time goes on.

We use rspec 2.5 and mocha.   In general terms, we discourage
mocking/stubbing too much, and prefer to have the real things as far
as possible.  We prefer fixtures inline, but large data makes that
hard, so end up in a separate fixtures directory.  We have some
helpers for finding those.

Sadly, I can't just recommend cloning the existing tests: some of them
are great, some are good, and some are a pretty mixed bag.  Take a
look in the area, or just write something.  We can more easily help
you polish something that gets the basics right.

Finally, we are totally happy to help, and even just describing the
expected results clearly, and giving us the input data we need to
reflect the platform can be a huge help.

Daniel
-- 
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <dan...@puppetlabs.com>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to