summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-04-25 17:52:37 +0200
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commitf35c59f83b8df2e595ec44a6258dbae30c81237e (patch)
tree6412ef4027d99e2cc70d6f0dcdb80d1c60649f13 /spec
parent938fbe914a811b10146f817368883df8180ef224 (diff)
downloadpuppet-f35c59f83b8df2e595ec44a6258dbae30c81237e.tar.gz
puppet-f35c59f83b8df2e595ec44a6258dbae30c81237e.tar.xz
puppet-f35c59f83b8df2e595ec44a6258dbae30c81237e.zip
Fix #3667 - Fix class namespace
Class namespace is different than namespace of nodes and definition as it contains the whole qualified name. This bit was left out in the type are not AST anymore refactoring. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/resource/type.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/unit/resource/type.rb b/spec/unit/resource/type.rb
index 514e6943b..fdb81f760 100755
--- a/spec/unit/resource/type.rb
+++ b/spec/unit/resource/type.rb
@@ -172,8 +172,14 @@ describe Puppet::Resource::Type do
Puppet::Resource::Type.new(:hostclass, "Foo::Bar".intern).name.should == "foo::bar"
end
- it "should set its namespace to the downcased, stringified qualified portion of the name" do
- Puppet::Resource::Type.new(:hostclass, "Foo::Bar::Baz".intern).namespace.should == "foo::bar"
+ it "should set its namespace to the downcased, stringified qualified name for classes" do
+ Puppet::Resource::Type.new(:hostclass, "Foo::Bar::Baz".intern).namespace.should == "foo::bar::baz"
+ end
+
+ [:definition, :node].each do |type|
+ it "should set its namespace to the downcased, stringified qualified portion of the name for #{type}s" do
+ Puppet::Resource::Type.new(type, "Foo::Bar::Baz".intern).namespace.should == "foo::bar"
+ end
end
%w{code line file doc}.each do |arg|