diff options
| author | James Turnbull <james@lovedthanlost.net> | 2008-02-08 16:35:06 +1100 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2008-02-08 16:35:06 +1100 |
| commit | c3ead0331adba5f60ea7d508775a89de68e26caa (patch) | |
| tree | af3e519a74c3d93986bbad2428a343d7b9bf0b30 /spec/unit | |
| parent | f7b0ca9e9475d4b6a9138d70256f143b8ba31f1a (diff) | |
| parent | 084d0fb6351ed54ff4c052cff20f21e89063620c (diff) | |
| download | puppet-c3ead0331adba5f60ea7d508775a89de68e26caa.tar.gz puppet-c3ead0331adba5f60ea7d508775a89de68e26caa.tar.xz puppet-c3ead0331adba5f60ea7d508775a89de68e26caa.zip | |
Merge branch '0.24.x' of git://reductivelabs.com/puppet into 0.24.x
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/resource_reference.rb | 6 | ||||
| -rwxr-xr-x | spec/unit/util/settings.rb | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/resource_reference.rb b/spec/unit/resource_reference.rb index ef172d80a..cbbd6ef51 100755 --- a/spec/unit/resource_reference.rb +++ b/spec/unit/resource_reference.rb @@ -40,6 +40,12 @@ describe Puppet::ResourceReference do ref.type.should == "Foo::Bar" ref.title.should == "yay" end + + it "should interpret the title as a reference and assign appropriately if the type is nil and the title contains nested square brackets" do + ref = Puppet::ResourceReference.new(nil, "foo::bar[baz[yay]]") + ref.type.should == "Foo::Bar" + ref.title.should =="baz[yay]" + end end describe Puppet::ResourceReference, "when resolving resources without a catalog" do diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb index f00afd1b7..b44a30eb2 100755 --- a/spec/unit/util/settings.rb +++ b/spec/unit/util/settings.rb @@ -605,6 +605,12 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d lambda { trans.to_catalog }.should_not raise_error end + it "should ignore file settings whose values are not strings" do + @settings[:maindir] = false + + lambda { trans = @settings.to_transportable }.should_not raise_error + end + it "should be able to turn the current configuration into a parseable manifest" it "should convert octal numbers correctly when producing a manifest" |
