summaryrefslogtreecommitdiffstats
path: root/spec/integration/transaction/report.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/transaction/report.rb')
-rwxr-xr-xspec/integration/transaction/report.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/integration/transaction/report.rb b/spec/integration/transaction/report.rb
new file mode 100755
index 000000000..48e59f203
--- /dev/null
+++ b/spec/integration/transaction/report.rb
@@ -0,0 +1,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::Transaction::Report.indirection.clear_cache }
+
+ 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