summaryrefslogtreecommitdiff
path: root/spec/unit/puppet
diff options
context:
space:
mode:
authorChris Price <chris@puppetlabs.com>2012-10-20 00:24:37 -0700
committerChris Price <chris@puppetlabs.com>2012-10-20 01:43:19 -0700
commit845fa707be7132e753f291901dd7e4d4dc48c405 (patch)
tree249d1d968cdc52f0da77bdc89866d43cd2464623 /spec/unit/puppet
parentc2c26de9b10c3675e1044d5571e47e195a5d0167 (diff)
downloadpuppet-inifile-845fa707be7132e753f291901dd7e4d4dc48c405.tar.gz
puppet-inifile-845fa707be7132e753f291901dd7e4d4dc48c405.tar.bz2
Better handling of whitespace lines at ends of sections
This is another bit of cosmetic functionality; prior to this commit, when adding a new setting to a section, we'd write it on the very last line before the next section, even if there was a chunk of trailing whitespace lines at the end of the existing section. This was functional, but the output was not always particularly pleasant for human consumption. This commit tweaks things so that we insert new settings just before the final chunk of whitespace lines in an existing section. This keeps things a bit cleaner.
Diffstat (limited to 'spec/unit/puppet')
-rw-r--r--spec/unit/puppet/provider/ini_setting/ruby_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/unit/puppet/provider/ini_setting/ruby_spec.rb b/spec/unit/puppet/provider/ini_setting/ruby_spec.rb
index dc3b7cb..19db4c7 100644
--- a/spec/unit/puppet/provider/ini_setting/ruby_spec.rb
+++ b/spec/unit/puppet/provider/ini_setting/ruby_spec.rb
@@ -361,6 +361,7 @@ foo = http://192.168.1.1:8080
provider.create
validate_file(<<-EOS
foo = yippee
+
[section2]
foo = http://192.168.1.1:8080
EOS
@@ -571,8 +572,8 @@ subby=bar
bar = barvalue
master = true
-
yahoo = yippee
+
[section2]
foo= foovalue2
baz=bazvalue