Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the ability to spec test an arbitrary string #619

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adds the ability to spec test an arbitrary string #619

wants to merge 1 commit into from

Commits on Nov 3, 2017

  1. Adds the ability to spec test an arbitrary string

    We are building a web service that will enable rspec-puppet testing of
    POSTed Puppet code. The use case is a tutorial that will allow users to
    type in a snippet of Puppet code and get immediate validation of whether
    they'd completed the exercise correctly.
    
    Example test:
    
    ```Ruby
    require 'rspec-puppet'
    
    RSpec::configure do |c|
      c.string = "package { 'httpd':
        ensure => present,
      }"
    end
    
    describe 'apache', :type => :string do
      let(:node) { 'testhost.example.com' }
    
      describe 'when called with no parameters on redhat' do
        let (:facts) { { ... } }
    
        it {
          should contain_package('httpd').with({
            'ensure' => 'present',
          })
        }
      end
    end
    ```
    binford2k committed Nov 3, 2017
    Configuration menu
    Copy the full SHA
    4409ed2 View commit details
    Browse the repository at this point in the history