source: src/puppetcode/environments/test/modules/stdlib/spec/acceptance/str2bool_spec.rb@ e6c9e70

debian/bullseye debian/jessie
Last change on this file since e6c9e70 was 1c22429, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago
  • gnuboat_epd adds the apt repository from gnuboat to install epd-fuse package
  • Property mode set to 100755
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.