diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-05 05:12:37 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-05 05:12:37 +0000 |
commit | e75671111b56e14ef6459bb783a261752efa0089 (patch) | |
tree | 4463beea3e0ea2c66f395bc4b94b72bc617dcb79 | |
parent | 48bbd0b33720440d39d41cebf2c83ce1571cdc08 (diff) | |
download | puppet-e75671111b56e14ef6459bb783a261752efa0089.tar.gz puppet-e75671111b56e14ef6459bb783a261752efa0089.tar.xz puppet-e75671111b56e14ef6459bb783a261752efa0089.zip |
Fixing #411.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2051 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | lib/puppet/metatype/metaparams.rb | 4 | ||||
-rwxr-xr-x | 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$ |