X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Facceptance%2Fis_bool_spec.rb;h=e9dab73c6d45de97634f82b1221fde86bbb49148;hb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f;hp=823cb46738a2c25aaab1a67f4ce51b5a3b0f7fea;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/acceptance/is_bool_spec.rb b/3rdparty/modules/stdlib/spec/acceptance/is_bool_spec.rb old mode 100755 new mode 100644 index 823cb4673..e9dab73c6 --- a/3rdparty/modules/stdlib/spec/acceptance/is_bool_spec.rb +++ b/3rdparty/modules/stdlib/spec/acceptance/is_bool_spec.rb @@ -1,76 +1,74 @@ -#! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' describe 'is_bool function' do describe 'success' do - it 'is_bools arrays' do - pp = <<-EOS + pp1 = <<-DOC $a = ['aaa','bbb','ccc'] $b = false $o = is_bool($a) if $o == $b { notify { 'output correct': } } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) + DOC + it 'is_bools arrays' do + apply_manifest(pp1, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: output correct}) end end - it 'is_bools true' do - pp = <<-EOS + + pp2 = <<-DOC $a = true $b = true $o = is_bool($a) if $o == $b { notify { 'output correct': } } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) + DOC + it 'is_bools true' do + apply_manifest(pp2, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: output correct}) end end - it 'is_bools false' do - pp = <<-EOS + + pp3 = <<-DOC $a = false $b = true $o = is_bool($a) if $o == $b { notify { 'output correct': } } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) + DOC + it 'is_bools false' do + apply_manifest(pp3, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: output correct}) end end - it 'is_bools strings' do - pp = <<-EOS + + pp4 = <<-DOC $a = "true" $b = false $o = is_bool($a) if $o == $b { notify { 'output correct': } } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) + DOC + it 'is_bools strings' do + apply_manifest(pp4, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: output correct}) end end - it 'is_bools hashes' do - pp = <<-EOS + + pp5 = <<-DOC $a = {'aaa'=>'bbb'} $b = false $o = is_bool($a) if $o == $b { notify { 'output correct': } } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) + DOC + it 'is_bools hashes' do + apply_manifest(pp5, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: output correct}) end end end