summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2011-03-15 17:28:52 -0700
committerJesse Wolfe <jes5199@gmail.com>2011-03-15 17:28:52 -0700
commit9781032736a34f577241828bcf812a648b4f42e9 (patch)
tree2fa66f45306be3dfa1f37564a686e0f49d23b7be /spec
parent658bdb72bee3ad664627a71793213e6540afd5cb (diff)
downloadpuppet-9781032736a34f577241828bcf812a648b4f42e9.tar.gz
puppet-9781032736a34f577241828bcf812a648b4f42e9.tar.xz
puppet-9781032736a34f577241828bcf812a648b4f42e9.zip
Revert "Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into 2.6.next"
This reverts commit 658bdb72bee3ad664627a71793213e6540afd5cb, reversing changes made to 4c9bd43bc2f5fde9d86196e8689dced929d39aad. See comment at http://projects.puppetlabs.com/issues/5605#note-9
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/resource_spec.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index 6f94409ab..345ccd06e 100755
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -276,7 +276,7 @@ describe Puppet::Resource do
describe "when referring to a resource with name canonicalization" do
it "should canonicalize its own name" do
res = Puppet::Resource.new("file", "/path/")
- res.uniqueness_key.should == "/path"
+ res.uniqueness_key.should == ["/path"]
res.ref.should == "File[/path/]"
end
end
@@ -800,14 +800,7 @@ type: File
end
describe "when generating the uniqueness key" do
-
- it "should use namevar if there is only one key_attribute" do
- Puppet::Type.type(:file).stubs(:key_attributes).returns [:path]
- res = Puppet::Resource.new("file", "/my/file", :parameters => {:owner => 'root', :content => 'hello'})
- res.uniqueness_key.should == '/my/file'
- end
-
- it "should include all of the key_attributes" do
+ it "should include all of the key_attributes in alphabetical order by attribute name" do
Puppet::Type.type(:file).stubs(:key_attributes).returns [:myvar, :owner, :path]
Puppet::Type.type(:file).stubs(:title_patterns).returns(
[ [ /(.*)/, [ [:path, lambda{|x| x} ] ] ] ]