summaryrefslogtreecommitdiffstats
path: root/spec/integration/transaction/report.rb
blob: 6bbd5eb10fee63f59447dc65ef50b5e81093eb32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env ruby
#
#  Created by Luke Kanies on 2008-4-8.
#  Copyright (c) 2008. All rights reserved.

require File.dirname(__FILE__) + '/../../spec_helper'

describe Puppet::Transaction::Report do
    describe "when using the indirector" do
        after { Puppet::Util::Cacher.invalidate }

        it "should be able to delegate to the :processor terminus" do
            Puppet::Transaction::Report.indirection.stubs(:terminus_class).returns :processor

            terminus = Puppet::Transaction::Report.indirection.terminus(:processor)

            Facter.stubs(:value).returns "host.domain.com"

            report = Puppet::Transaction::Report.new

            terminus.expects(:process).with(report)

            report.save
        end
    end
end