diff options
author | Luke Kanies <luke@madstop.com> | 2009-02-06 17:52:34 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-02-06 18:08:44 -0600 |
commit | 53357884111d3499746b292f99948d5eb3c83415 (patch) | |
tree | 063ea361e228b5bf711a3b96ef2faa84bb74fce0 /spec/unit/resource.rb | |
parent | 08a5d492dd3545366a2850d568d87aad0ba884e6 (diff) | |
download | puppet-53357884111d3499746b292f99948d5eb3c83415.tar.gz puppet-53357884111d3499746b292f99948d5eb3c83415.tar.xz puppet-53357884111d3499746b292f99948d5eb3c83415.zip |
Fixing tests broken during the #1405 fix.
Most of these were small changes, like moved methods.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/resource.rb')
-rwxr-xr-x | spec/unit/resource.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/unit/resource.rb b/spec/unit/resource.rb index f24ec0123..0fcf51b8b 100755 --- a/spec/unit/resource.rb +++ b/spec/unit/resource.rb @@ -56,6 +56,20 @@ describe Puppet::Resource do resource.title.should == "mytitle" end + it "should use its resource reference to determine whether it is builtin" do + ref = Puppet::Resource::Reference.new("file", "/f") + Puppet::Resource::Reference.expects(:new).returns ref + resource = Puppet::Resource.new("file", "/f") + ref.expects(:builtin_type?).returns "yep" + resource.builtin_type?.should == "yep" + end + + it "should call its builtin_type? method when 'builtin?' is called" do + resource = Puppet::Resource.new("file", "/f") + resource.expects(:builtin_type?).returns "foo" + resource.builtin?.should == "foo" + end + it "should use its resource reference to produce its canonical reference string" do ref = Puppet::Resource::Reference.new("file", "/f") Puppet::Resource::Reference.expects(:new).returns ref |