1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'squeeze function' do
6 it 'squeezes arrays' do
9 $a = ["wallless", "laparohysterosalpingooophorectomy", "brrr", "goddessship"]
11 notice(inline_template('squeeze is <%= @o.inspect %>'))
14 apply_manifest(pp, :catch_failures => true) do |r|
15 expect(r.stdout).to match(/squeeze is \["wales", "laparohysterosalpingophorectomy", "br", "godeship"\]/)
18 it 'squeezez arrays with an argument'
19 it 'squeezes strings' do
21 $a = "wallless laparohysterosalpingooophorectomy brrr goddessship"
23 notice(inline_template('squeeze is <%= @o.inspect %>'))
26 apply_manifest(pp, :catch_failures => true) do |r|
27 expect(r.stdout).to match(/squeeze is "wales laparohysterosalpingophorectomy br godeship"/)
31 it 'squeezes strings with an argument' do
33 $a = "countessship duchessship governessship hostessship"
35 notice(inline_template('squeeze is <%= @o.inspect %>'))
38 apply_manifest(pp, :catch_failures => true) do |r|
39 expect(r.stdout).to match(/squeeze is "counteship ducheship governeship hosteship"/)
44 it 'handles no arguments'
45 it 'handles non strings or arrays'