union_spec.rb 601 B

1234567891011121314151617181920212223
  1. require 'spec_helper_acceptance'
  2. describe 'union function' do
  3. describe 'success' do
  4. pp = <<-DOC
  5. $a = ["the","public"]
  6. $b = ["art"]
  7. $c = ["galleries"]
  8. # Anagram: Large picture halls, I bet
  9. $o = union($a,$b,$c)
  10. notice(inline_template('union is <%= @o.inspect %>'))
  11. DOC
  12. it 'unions arrays' do
  13. apply_manifest(pp, :catch_failures => true) do |r|
  14. expect(r.stdout).to match(%r{union is \["the", "public", "art", "galleries"\]})
  15. end
  16. end
  17. end
  18. describe 'failure' do
  19. it 'handles no arguments'
  20. it 'handles non arrays'
  21. end
  22. end