summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/metatype/metaparams.rb4
-rwxr-xr-xtest/other/relationships.rb9
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$