Testing Puppet With Hiera

From Kyle's Wiki
Jump to: navigation, search

Contents

Getting The Gem

Put this in your Gemfile or Gem install:

gem 'hiera-puppet-helper'
# Then bundle install

or

gem install hiera-puppet-helper

Adding the Helper to Rspec

Simply require it in spec/spec_helper.rb:

require 'hiera-puppet-helper'

Adding it to a Test

describe "example" do
  let(:hiera_data) {{ :foo_message => "bar" }}

  it { should contain_notify("foo").with_message("bar") }
end

References

Personal tools
Namespaces

Variants
Actions
Efforts
Toolbox
Meta