Skip to content

Commit f13f3c2

Browse files
author
Jeff McCune
committed
(puppetlabs#3) Add simple unit test for anchor type
Unlike the whit type the anchor type derives from, we are not hacking the stringify method. We expect the resource to be named simply Anchor[foo::bar] where the name is "foo::bar".
1 parent ab70663 commit f13f3c2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/unit/puppet/type/anchor_spec.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'puppet'
4+
5+
anchor = Puppet::Type.type(:anchor).new(:name => "ntp::begin")
6+
7+
describe anchor do
8+
it "should stringify normally" do
9+
anchor.to_s.should == "Anchor[ntp::begin]"
10+
end
11+
end

0 commit comments

Comments
 (0)