source: other-projects/hathitrust/vagrant-hadoop-cluster/trunk/modules/stdlib/spec/acceptance/str2bool_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: 822 bytes
Line 
1#! /usr/bin/env ruby -S rspec
2require 'spec_helper_acceptance'
3
4describe 'str2bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5 describe 'success' do
6 it 'works with "y"' do
7 pp = <<-EOS
8 $o = str2bool('y')
9 notice(inline_template('str2bool is <%= @o.inspect %>'))
10 EOS
11
12 apply_manifest(pp, :catch_failures => true) do |r|
13 expect(r.stdout).to match(/str2bool is true/)
14 end
15 end
16 it 'works with "Y"'
17 it 'works with "yes"'
18 it 'works with "1"'
19 it 'works with "true"'
20 it 'works with "n"'
21 it 'works with "N"'
22 it 'works with "no"'
23 it 'works with "0"'
24 it 'works with "false"'
25 it 'works with undef'
26 end
27 describe 'failure' do
28 it 'handles no arguments'
29 it 'handles non arrays or strings'
30 end
31end
Note: See TracBrowser for help on using the repository browser.