X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Facceptance%2Frange_spec.rb;h=a5a7d222252ae8b48b4506cdd3feb9fb428c8081;hb=59812388abf4638d6065ffda934d1866af902302;hp=f57f8840d94e9ba5f6aff25df6185fa26ab860aa;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;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 f57f8840d..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' 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'