summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/resource_reference.rb6
-rwxr-xr-xspec/unit/util/settings.rb6
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"