X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Facceptance%2Fbool2num_spec.rb;h=bf6611e2b9004fde85bf4ef0be5ec97ef2800dab;hb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f;hp=52ff75bcfa057c1e8a717d86ae0770787a8f43ba;hpb=ad88f67c13ae0f1a08936dad643f1e3509ab5f40;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/acceptance/bool2num_spec.rb b/3rdparty/modules/stdlib/spec/acceptance/bool2num_spec.rb old mode 100755 new mode 100644 index 52ff75bcf..bf6611e2b --- a/3rdparty/modules/stdlib/spec/acceptance/bool2num_spec.rb +++ b/3rdparty/modules/stdlib/spec/acceptance/bool2num_spec.rb @@ -1,32 +1,29 @@ -#! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -describe 'bool2num function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do +describe 'bool2num function' do describe 'success' do ['false', 'f', '0', 'n', 'no'].each do |bool| - it "should convert a given boolean, #{bool}, to 0" do - pp = <<-EOS + pp1 = <<-DOC $input = "#{bool}" $output = bool2num($input) notify { "$output": } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 0/) + DOC + it "should convert a given boolean, #{bool}, to 0" do + apply_manifest(pp1, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: 0}) end end end ['true', 't', '1', 'y', 'yes'].each do |bool| - it "should convert a given boolean, #{bool}, to 1" do - pp = <<-EOS + pp2 = <<-DOC $input = "#{bool}" $output = bool2num($input) notify { "$output": } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 1/) + DOC + it "should convert a given boolean, #{bool}, to 1" do + apply_manifest(pp2, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: 1}) end end end