summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser')
-rwxr-xr-xspec/unit/parser/ast/leaf.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/parser/ast/leaf.rb b/spec/unit/parser/ast/leaf.rb
index 6215f6345..69b704ad8 100755
--- a/spec/unit/parser/ast/leaf.rb
+++ b/spec/unit/parser/ast/leaf.rb
@@ -200,6 +200,11 @@ describe Puppet::Parser::AST::HostName do
host.to_classname.should == "this-isnotaclassname"
end
+ it "should return a string usable as a tag when calling to_classname" do
+ host = Puppet::Parser::AST::HostName.new( :value => Puppet::Parser::AST::Regex.new(:value => "/.+.reductivelabs\.com/") )
+ host.to_classname.should == "reductivelabs.com"
+ end
+
it "should delegate 'match' to the underlying value if it is an HostName" do
@value.expects(:match).with("value")
@host.match("value")