From f13f3c2916c2857a3949d5ac6b884c045804ebac Mon Sep 17 00:00:00 2001 From: Jeff McCune Date: Wed, 15 Jun 2011 09:43:22 -0700 Subject: (#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". --- spec/unit/puppet/type/anchor_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 spec/unit/puppet/type/anchor_spec.rb (limited to 'spec') diff --git a/spec/unit/puppet/type/anchor_spec.rb b/spec/unit/puppet/type/anchor_spec.rb new file mode 100644 index 0000000..2030b83 --- /dev/null +++ b/spec/unit/puppet/type/anchor_spec.rb @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby + +require 'puppet' + +anchor = Puppet::Type.type(:anchor).new(:name => "ntp::begin") + +describe anchor do + it "should stringify normally" do + anchor.to_s.should == "Anchor[ntp::begin]" + end +end -- cgit v1.2.3