1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'unique function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
8 $a = ["wallless", "wallless", "brrr", "goddessship"]
10 notice(inline_template('unique is <%= @o.inspect %>'))
13 apply_manifest(pp, :catch_failures => true) do |r|
14 expect(r.stdout).to match(/unique is \["wallless", "brrr", "goddessship"\]/)
17 it 'uniques strings' do
19 $a = "wallless laparohysterosalpingooophorectomy brrr goddessship"
21 notice(inline_template('unique is <%= @o.inspect %>'))
24 apply_manifest(pp, :catch_failures => true) do |r|
25 expect(r.stdout).to match(/unique is "wales prohytingcmbd"/)
30 it 'handles no arguments'
31 it 'handles non strings or arrays'