source: other-projects/hathitrust/vagrant-hadoop-cluster/trunk/modules/stdlib/spec/acceptance/squeeze_spec.rb@ 30903

Last change on this file since 30903 was 30903, checked in by davidb, 7 years ago

Vagrant provisioning files for a 4-node Hadoop cluster. See README.txt for more details

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#! /usr/bin/env ruby -S rspec
2require 'spec_helper_acceptance'
3
4describe 'squeeze function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5 describe 'success' do
6 it 'squeezes arrays' do
7 pp = <<-EOS
8 # Real words!
9 $a = ["wallless", "laparohysterosalpingooophorectomy", "brrr", "goddessship"]
10 $o = squeeze($a)
11 notice(inline_template('squeeze is <%= @o.inspect %>'))
12 EOS
13
14 apply_manifest(pp, :catch_failures => true) do |r|
15 expect(r.stdout).to match(/squeeze is \["wales", "laparohysterosalpingophorectomy", "br", "godeship"\]/)
16 end
17 end
18 it 'squeezez arrays with an argument'
19 it 'squeezes strings' do
20 pp = <<-EOS
21 $a = "wallless laparohysterosalpingooophorectomy brrr goddessship"
22 $o = squeeze($a)
23 notice(inline_template('squeeze is <%= @o.inspect %>'))
24 EOS
25
26 apply_manifest(pp, :catch_failures => true) do |r|
27 expect(r.stdout).to match(/squeeze is "wales laparohysterosalpingophorectomy br godeship"/)
28 end
29 end
30
31 it 'squeezes strings with an argument' do
32 pp = <<-EOS
33 $a = "countessship duchessship governessship hostessship"
34 $o = squeeze($a, 's')
35 notice(inline_template('squeeze is <%= @o.inspect %>'))
36 EOS
37
38 apply_manifest(pp, :catch_failures => true) do |r|
39 expect(r.stdout).to match(/squeeze is "counteship ducheship governeship hosteship"/)
40 end
41 end
42 end
43 describe 'failure' do
44 it 'handles no arguments'
45 it 'handles non strings or arrays'
46 end
47end
Note: See TracBrowser for help on using the repository browser.