summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2010-09-27 15:23:47 -0700
committerMarkus Roberts <Markus@reality.com>2010-09-28 15:36:22 -0700
commiteffc6b8e292992d2df1d321b5d5bf68208db6b24 (patch)
tree44015b65a6d4bc517b60724918971e124c4cbc6c /spec
parent3f99bd71811be182f9217d727ec0ca7755eec68d (diff)
downloadpuppet-effc6b8e292992d2df1d321b5d5bf68208db6b24.tar.gz
puppet-effc6b8e292992d2df1d321b5d5bf68208db6b24.tar.xz
puppet-effc6b8e292992d2df1d321b5d5bf68208db6b24.zip
Fixes #4852 - error messages involving Whits now mention Classes instead
Whits are inserted into the dependency graph in the place where an empty class is being required. Unfortunately, when such a class is involved in a loop, the error message shows the cycle as involving Whit[Classname]. This patch changes it to say Class[Classname], which is much easier to understand. It also fixes puppetdoc from generating documentation on the Whit type.
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/type/whit_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/type/whit_spec.rb b/spec/unit/type/whit_spec.rb
new file mode 100644
index 000000000..998d9df30
--- /dev/null
+++ b/spec/unit/type/whit_spec.rb
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+whit = Puppet::Type.type(:whit).new(:name => "Foo::Bar")
+
+describe whit do
+ it "should stringify as though it were the class it represents" do
+ whit.to_s.should == "Class[Foo::Bar]"
+ end
+end