X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Facceptance%2Fceiling_spec.rb;h=782096a5f7c15a805612ecd407b5fe1b084f875b;hb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f;hp=895e4a09fc747189c08e78c78f35cc0f3b717517;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/acceptance/ceiling_spec.rb b/3rdparty/modules/stdlib/spec/acceptance/ceiling_spec.rb old mode 100755 new mode 100644 index 895e4a09f..782096a5f --- a/3rdparty/modules/stdlib/spec/acceptance/ceiling_spec.rb +++ b/3rdparty/modules/stdlib/spec/acceptance/ceiling_spec.rb @@ -1,34 +1,32 @@ -#! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -describe 'ceiling function' do +describe 'ceiling function', :if => Puppet::Util::Package.versioncmp(return_puppet_version, '6.0.0') < 0 do describe 'success' do - it 'ceilings floats' do - pp = <<-EOS + pp1 = <<-DOC $a = 12.8 $b = 13 $o = ceiling($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 'ceilings floats' do + apply_manifest(pp1, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: output correct}) end end - it 'ceilings integers' do - pp = <<-EOS + + pp2 = <<-DOC $a = 7 $b = 7 $o = ceiling($a) if $o == $b { - notify { 'output correct': } + notify { 'output is correct': } } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) + DOC + it 'ceilings integers' do + apply_manifest(pp2, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{Notice: output is correct}) end end end