X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Facceptance%2Frange_spec.rb;h=a5a7d222252ae8b48b4506cdd3feb9fb428c8081;hb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f;hp=a3ccd3396aa1a57ff072638788b5076ad94f08a4;hpb=ad88f67c13ae0f1a08936dad643f1e3509ab5f40;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/acceptance/range_spec.rb b/3rdparty/modules/stdlib/spec/acceptance/range_spec.rb old mode 100755 new mode 100644 index a3ccd3396..a5a7d2222 --- a/3rdparty/modules/stdlib/spec/acceptance/range_spec.rb +++ b/3rdparty/modules/stdlib/spec/acceptance/range_spec.rb @@ -1,26 +1,24 @@ -#! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -describe 'range function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do +describe 'range function' do describe 'success' do - it 'ranges letters' do - pp = <<-EOS + pp1 = <<-DOC $o = range('a','d') notice(inline_template('range is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/range is \["a", "b", "c", "d"\]/) + DOC + it 'ranges letters' do + apply_manifest(pp1, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{range is \["a", "b", "c", "d"\]}) end end - it 'ranges letters with a step' do - pp = <<-EOS + + pp2 = <<-DOC $o = range('a','d', '2') notice(inline_template('range is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/range is \["a", "c"\]/) + DOC + it 'ranges letters with a step' do + apply_manifest(pp2, :catch_failures => true) do |r| + expect(r.stdout).to match(%r{range is \["a", "c"\]}) end end it 'ranges letters with a negative step'