1 require 'spec_helper_acceptance'
3 describe 'bool2num function' do
5 ['false', 'f', '0', 'n', 'no'].each do |bool|
8 $output = bool2num($input)
11 it "should convert a given boolean, #{bool}, to 0" do
12 apply_manifest(pp1, :catch_failures => true) do |r|
13 expect(r.stdout).to match(%r{Notice: 0})
18 ['true', 't', '1', 'y', 'yes'].each do |bool|
21 $output = bool2num($input)
24 it "should convert a given boolean, #{bool}, to 1" do
25 apply_manifest(pp2, :catch_failures => true) do |r|
26 expect(r.stdout).to match(%r{Notice: 1})