On Sun, Jul 17, 2011 at 10:23 PM, Luke Kanies <[email protected]> wrote:

> On Jul 17, 2011, at 4:53 PM, Tim Sharpe wrote:
>
>  Hi Dan,
>
> Yeah, I'm focusing mainly on getting a clean RSpec API at the moment.  What
> it looks like currently is
>
>     require 'rspec-puppet'
>
>     describe 'sysctl', :type => :define do
>       let(:module_path) { '/path/to/my/modules' }
>       let(:name) { 'baz' }
>       let(:params) { { :value => 'foo' } }
>
>       it { should create_exec('sysctl/reload').with_command("/sbin/sysctl
> -p /etc/sysctl.conf") }
>     end
>
> This generates the catalogue for "sysctl { 'baz': value => 'foo' }" and
> checks that Exec['sysctl/reload'] exists with the specified command.
>
> The code still has a few hardcoded values - that I need to get rid of -
> that prevent it from being usable by anyone else, but you can check out the
> code at https://github.com/rodjek/rspec-puppet.  I'd love to hear any
> suggestions that you have!
>
>
> I really like this.  I've been getting more into matchers, and I think it'd
> be fantastic to have a collection of matchers that made it easy to test
> manifests.
>
> What's the reason for the separate 'create_exec', vs. the more generic
> 'create_resource'?
>

if you pull the latest version, you will see that is already resolved


>  --
> If there is anything the nonconformist hates worse than a conformist,
> it's another nonconformist who doesn't conform to the prevailing
> standard of nonconformity.    --Bill Vaughan
>
> ---------------------------------------------------------------------
> Luke Kanies | http://puppetlabs.com | http://about.me/lak
>
> Join us in PDX for PuppetConf: http://bit.ly/puppetconfsig
>
>
>  --
> 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.
>



-- 
"Join us for PuppetConf <http://bit.ly/puppetconfsig>, September 22nd and
23rd in Portland, OR."

bit.ly/puppetconfsig

-- 
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