From 0ea02e4c6c42752e93680d2f5954cd70fbeb9267 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Fri, 5 Jun 2015 11:50:29 -0700 Subject: [PATCH] fixes special characters test to support windows file restrictions --- spec/acceptance/concat_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/concat_spec.rb b/spec/acceptance/concat_spec.rb index fd130fed1..f84a38fd0 100644 --- a/spec/acceptance/concat_spec.rb +++ b/spec/acceptance/concat_spec.rb @@ -150,6 +150,8 @@ end end context 'works when set to present with path that has special characters' do + filename = fact('osfamily') == 'windows' ? 'file(1)' : 'file(1:2)' + before(:all) do pp = <<-EOS file { '#{basedir}': @@ -159,13 +161,13 @@ apply_manifest(pp) end pp=" - concat { 'file(a:b)': + concat { '#{filename}': ensure => present, - path => '#{basedir}/file(a:b)', + path => '#{basedir}/#{filename}', mode => '0644', } concat::fragment { '1': - target => 'file(a:b)', + target => '#{filename}', content => '1', order => '01', } @@ -173,7 +175,7 @@ it_behaves_like 'successfully_applied', pp - describe file("#{basedir}/file(a:b)") do + describe file("#{basedir}/#{filename}") do it { should be_file } it("should be mode", :unless => (fact('osfamily') == 'AIX' or fact('osfamily') == 'windows')) { should be_mode 644