join_spec.rb 611 B

123456789101112131415161718192021222324
  1. require 'spec_helper_acceptance'
  2. describe 'join function', :if => Puppet::Util::Package.versioncmp(Puppet.version, '5.5.0') < 0 do
  3. describe 'success' do
  4. pp = <<-DOC
  5. $a = ['aaa','bbb','ccc']
  6. $b = ':'
  7. $c = 'aaa:bbb:ccc'
  8. $o = join($a,$b)
  9. if $o == $c {
  10. notify { 'output correct': }
  11. }
  12. DOC
  13. it 'joins arrays' do
  14. apply_manifest(pp, :catch_failures => true) do |r|
  15. expect(r.stdout).to match(%r{Notice: output correct})
  16. end
  17. end
  18. it 'handles non arrays'
  19. end
  20. describe 'failure' do
  21. it 'handles improper argument counts'
  22. end
  23. end