From 69bee205c4cc0cf41d0d134bf8f9aadf12057ed3 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Tue, 31 Mar 2015 14:26:11 -0700 Subject: [PATCH] Adds acceptance testing for setting names containing white space in the middle --- spec/acceptance/ini_setting_spec.rb | 7 ++++--- spec/unit/puppet/util/ini_file_spec.rb | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/ini_setting_spec.rb b/spec/acceptance/ini_setting_spec.rb index 26bdf759b..b7e2b6a79 100644 --- a/spec/acceptance/ini_setting_spec.rb +++ b/spec/acceptance/ini_setting_spec.rb @@ -147,9 +147,10 @@ describe 'section, setting, value parameters' do { - "section => 'test', setting => 'foo', value => 'bar'," => /\[test\]\nfoo = bar/, - "section => 'more', setting => 'baz', value => 'quux'," => /\[more\]\nbaz = quux/, - "section => '', setting => 'top', value => 'level'," => /top = level/, + "section => 'test', setting => 'foo', value => 'bar'," => /\[test\]\nfoo = bar/, + "section => 'more', setting => 'baz', value => 'quux'," => /\[more\]\nbaz = quux/, + "section => '', setting => 'top', value => 'level'," => /top = level/, + "section => 'z', setting => 'sp aces', value => 'foo bar'," => /\[z\]\nsp aces = foo bar/, }.each do |parameter_list, content| context parameter_list do pp = <<-EOS diff --git a/spec/unit/puppet/util/ini_file_spec.rb b/spec/unit/puppet/util/ini_file_spec.rb index 637749006..7a92090a3 100644 --- a/spec/unit/puppet/util/ini_file_spec.rb +++ b/spec/unit/puppet/util/ini_file_spec.rb @@ -262,7 +262,8 @@ subject.get_value("Drive names", "C:").should eq 'Winchester' end end -context 'Configuration with spaces in setting names' do + + context 'Configuration with spaces in setting names' do let(:sample_content) do template = <<-EOS [global]