quoted_paths_spec.rb 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. require 'spec_helper_acceptance'
  2. describe 'quoted paths' do
  3. basedir = default.tmpdir('concat')
  4. before(:all) do
  5. pp = <<-EOS
  6. file { '#{basedir}':
  7. ensure => directory,
  8. }
  9. file { '#{basedir}/concat test':
  10. ensure => directory,
  11. }
  12. EOS
  13. apply_manifest(pp)
  14. end
  15. context 'path with blanks' do
  16. pp = <<-EOS
  17. concat { '#{basedir}/concat test/foo':
  18. }
  19. concat::fragment { '1':
  20. target => '#{basedir}/concat test/foo',
  21. content => 'string1',
  22. }
  23. concat::fragment { '2':
  24. target => '#{basedir}/concat test/foo',
  25. content => 'string2',
  26. }
  27. EOS
  28. it 'applies the manifest twice with no stderr' do
  29. apply_manifest(pp, :catch_failures => true)
  30. apply_manifest(pp, :catch_changes => true)
  31. end
  32. describe file("#{basedir}/concat test/foo") do
  33. it { should be_file }
  34. it("should contain string1\nstring2", :unless => (fact('osfamily') == 'Solaris')) {
  35. should contain "string1\nstring2"
  36. }
  37. end
  38. end
  39. end