1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'range function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
9 notice(inline_template('range is <%= @o.inspect %>'))
12 apply_manifest(pp, :catch_failures => true) do |r|
13 expect(r.stdout).to match(/range is \["a", "b", "c", "d"\]/)
16 it 'ranges letters with a step' do
18 $o = range('a','d', '2')
19 notice(inline_template('range is <%= @o.inspect %>'))
22 apply_manifest(pp, :catch_failures => true) do |r|
23 expect(r.stdout).to match(/range is \["a", "c"\]/)
26 it 'ranges letters with a negative step'
28 it 'ranges numbers with a step'
29 it 'ranges numbers with a negative step'
30 it 'ranges numeric strings'
31 it 'ranges zero padded numbers'
34 it 'fails with no arguments'