|
@@ -400,6 +400,26 @@ foo=bar
|
|
|
EOS
|
|
|
}
|
|
|
|
|
|
+ it "should fail if the separator doesn't include an equals sign" do
|
|
|
+ expect {
|
|
|
+ Puppet::Type::Ini_setting.new(common_params.merge(
|
|
|
+ :section => 'section2',
|
|
|
+ :setting => 'foo',
|
|
|
+ :value => 'yippee',
|
|
|
+ :key_val_separator => '+'))
|
|
|
+ }.to raise_error Puppet::Error, /must contain exactly one/
|
|
|
+ end
|
|
|
+
|
|
|
+ it "should fail if the separator includes more than one equals sign" do
|
|
|
+ expect {
|
|
|
+ Puppet::Type::Ini_setting.new(common_params.merge(
|
|
|
+ :section => 'section2',
|
|
|
+ :setting => 'foo',
|
|
|
+ :value => 'yippee',
|
|
|
+ :key_val_separator => ' = foo = '))
|
|
|
+ }.to raise_error Puppet::Error, /must contain exactly one/
|
|
|
+ end
|
|
|
+
|
|
|
it "should modify an existing setting" do
|
|
|
resource = Puppet::Type::Ini_setting.new(common_params.merge(
|
|
|
:section => 'section2',
|