Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Aug 9, 2012
  1. Bump to 0.1.4

  2. Fix bug with optional arrays in the matcher

    When a type parameter takes an array with a single value, the compiled version
    only has the single value not as an array.
Commits on Aug 8, 2012
  1. @fungusakafungus

    fix tests for rspec-2.11.0

    fungusakafungus authored committed
  2. Merge pull request #36 from bodepd/pre_condition_catalogs_function_te…

    Add support for pre_condition with functions
Commits on Aug 3, 2012
  1. @fungusakafungus
Commits on Aug 2, 2012
  1. @bodepd

    Add support for pre_condition with functions

    bodepd authored
    This commit adds support for using the pre_condition
    hook to specify the source code that should be used to
    compile a catalog that can be introspected by functions for
    testing purposes.
    This allows users to test functions that need access to
    catalog contents.
    This allows the following snippet to test a function that
    needs access to the catalog generated by pre_condition:
      describe 'defined_with_params' do
        #describe 'when resource is passed as a string' do
        let :pre_condition do
          'user { "dan": }'
        it { should run.with_params('User[dan]', {}).and_return('true') }
Commits on Jul 31, 2012
  1. @fungusakafungus
Commits on Apr 7, 2012
  1. Bump to 0.1.3

Commits on Apr 6, 2012
  1. Puppet 2.7 under 1.9.x converts all array members to strings

    This hack should keep things working the same under 1.8 and 1.9
  2. Have travis build 1.9

Commits on Apr 5, 2012
Commits on Mar 12, 2012
  1. Merge pull request #21 from nanliu/tb/config

    Add Puppet[:config] as a supported option.
Commits on Feb 16, 2012
  1. @nanliu
Commits on Feb 15, 2012
Commits on Jan 20, 2012
  1. bump to 0.1.1

Commits on Dec 30, 2011
  1. @jeffmccune

    Merge pull request #18 from bodepd/with_without_methods

    jeffmccune authored
    Adds with/without methods
  2. @bodepd

    Add 'without' method

    bodepd authored
    Adds a method 'without' which accepts a list of
    parameters that should not be defined in the resource.
      it { should contain_service('keystone').without(
        ['restart', 'status']
Commits on Dec 29, 2011
  1. @bodepd

    Add with method to generic matcher

    bodepd authored
    This commit adds a method 'with' that can be used
    to test mulitple parameters/values with a single
    method call
      it do should contain_service('keystone').with(
        'ensure'     => 'running',
        'enable'     => 'true',
        'hasstatus'  => 'true',
        'hasrestart' => 'true'
      ) end
    It was created as a more condensed alternative to
    chaining methods per parameter to validate.
  2. @jeffmccune
  3. @jeffmccune

    Merge pull request #17 from jeffmccune/feature/master/improve_matcher…

    jeffmccune authored
    Add Regexp support to with_* matchers and improve error messages
  4. @bodepd

    Add Rake task 'spec'

    bodepd authored
    Adds the Rake task 'spec' for consistency
    with other Rakefiles in Puppet related projects.
  5. @jeffmccune

    Add Regexp support to with_* matchers and improve error messages

    jeffmccune authored
    Without this patch it is difficult to match portions of long strings
    which are attribute values of resource parameters.  For example, the
    content parameter of a file resource with a multi-line template.
    This patch makes it easier to match portions of the parameter's value by
    passing a Regexp instance to the with_ catch all matcher.
    The use case looks like:
        describe 'with lsbmajdistrelease available' do
          let(:facts) { @facter_facts.merge({'lsbmajdistrelease' => '6'}) }
          it { should_not contain_file('puppetenterprise.repo').with_content(missing_content) }
          it { should contain_package 'pe-ruby-devel' }
          it do
            should contain_file('puppetenterprise.repo').with_content(/baseurl=http/)
            should contain_file('puppetenterprise.repo').with_content(/pe_base/)
            should contain_file('puppetenterprise.repo').with_content(/pe_updates/)
            should contain_file('puppetenterprise.repo').with_content(/pe_extras/)
    This feature allows the same parameter to be matched multiple times using
    multiple different regular expressions.
    This patch also improves the error message by presenting the actual value in
    the catalog when it does not match the expectation.  This change applies to
    both String and Regexp expectation matches.
    The error output now looks like:
        1) pe_devel on redhat el6 os families with lsbmajdistrelease available
           Failure/Error: should contain_file('puppetenterprise.repo').with_content(/JEFF MCCUNE/)
             expected that the catalogue would contain File[puppetenterprise.repo] with content \
             matching `/JEFF MCCUNE/` but its value of `"# KERMIT FROG\n"` does not
    Spec tests have been added to exercise the handling of Regexp instances.
    Reviewed-by: Dan Bode
Commits on Dec 6, 2011
  1. @jeffmccune

    Fix rspec dependency

    jeffmccune authored
    Without this patch, working with rspec-puppet in IRB fails when directly
    requiring the library:
        ruby-1.8.7-p334 :001 > require 'rspec-puppet'
        NameError: uninitialized constant RSpec
            from /Users/jeff/.rvm/gems/ruby-1.8.7-p334@puppet/gems/rspec-puppet-0.1.0/lib/rspec-puppet/matchers/create_generic.rb:1
            from /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
            from /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
            from /Users/jeff/.rvm/gems/ruby-1.8.7-p334@puppet/gems/rspec-puppet-0.1.0/lib/rspec-puppet/matchers.rb:1
            from /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
            from /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
            from /Users/jeff/.rvm/gems/ruby-1.8.7-p334@puppet/gems/rspec-puppet-0.1.0/lib/rspec-puppet.rb:2
            from /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:58:in `gem_original_require'
            from /Users/jeff/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:58:in `require'
            from (irb):1
    This patch fixes the problem by requiring rspec directly from rspec-puppet.rb
Commits on Nov 3, 2011
  1. Bump to 0.1.0

Commits on Nov 1, 2011
  1. Don't hardcode path separator

Something went wrong with that request. Please try again.