Skip to content

Commit

Permalink
Merge pull request #334 from bmjen/fix-windows
Browse files Browse the repository at this point in the history
fixes special characters test to support windows file restrictions
  • Loading branch information
Morgan Haskel committed Jun 5, 2015
2 parents 375de4a + 0ea02e4 commit 171a304
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/acceptance/concat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}':
Expand All @@ -159,21 +161,21 @@
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',
}
"

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
Expand Down

0 comments on commit 171a304

Please sign in to comment.