Debugging Rspec Of Catalog Application

Running catalogs from RSpec tests is tricky. There are some examples in the existing test base that help doing it. One basic pattern goes like this: describe SomeThing let(:catalog) { Puppet::Resource::Catalog.new } context "when doing something else" do let(:resource) do Puppet::Type::MyType.new( :ensure => :present, :param => 'value', ) end it "behaves a certain way" do catalog.add_resource(resource) catalog.apply expect( check_result() ).to be_truthy end end end Of course, such tests can fail for various reasons. [Read More]