From e75671111b56e14ef6459bb783a261752efa0089 Mon Sep 17 00:00:00 2001 From: luke Date: Fri, 5 Jan 2007 05:12:37 +0000 Subject: Fixing #411. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2051 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/metatype/metaparams.rb | 4 ++-- test/other/relationships.rb | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/puppet/metatype/metaparams.rb b/lib/puppet/metatype/metaparams.rb index 1d58d27f2..355ee3ddc 100644 --- a/lib/puppet/metatype/metaparams.rb +++ b/lib/puppet/metatype/metaparams.rb @@ -275,10 +275,10 @@ class Puppet::Type # nil. unless object self.fail "Could not retrieve dependency '%s[%s]'" % - [type.capitalize, name] + [tname.to_s.capitalize, name] end - self.debug("subscribes to %s" % [object]) + self.debug("subscribes to %s" % [object.ref]) # Are we requiring them, or vice versa? See the builddepends # method for further docs on this. diff --git a/test/other/relationships.rb b/test/other/relationships.rb index 76155b090..a5c9db5dc 100755 --- a/test/other/relationships.rb +++ b/test/other/relationships.rb @@ -205,6 +205,15 @@ class TestRelationships < Test::Unit::TestCase file2[:notify] = file1 assert(file1.requires?(file2), "requires? failed to catch :notify relationship") end + + # Testing #411. It was a problem with builddepends. + def test_missing_deps + file = Puppet::Type.newfile :path => tempfile, :require => ["file", "/no/such/file"] + + assert_raise(Puppet::Error) do + file.builddepends + end + end end # $Id$ -- cgit