source: other-projects/hathitrust/vagrant-solr-cluster/trunk/modules/stdlib/spec/acceptance/range_spec.rb@ 30960

Last change on this file since 30960 was 30960, checked in by davidb, 7 years ago

Switch to using Puppet to provision machine. Strongly based on files developed for spark-hdfs cluster

  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#! /usr/bin/env ruby -S rspec
2require 'spec_helper_acceptance'
3
4describe 'range function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5 describe 'success' do
6 it 'ranges letters' do
7 pp = <<-EOS
8 $o = range('a','d')
9 notice(inline_template('range is <%= @o.inspect %>'))
10 EOS
11
12 apply_manifest(pp, :catch_failures => true) do |r|
13 expect(r.stdout).to match(/range is \["a", "b", "c", "d"\]/)
14 end
15 end
16 it 'ranges letters with a step' do
17 pp = <<-EOS
18 $o = range('a','d', '2')
19 notice(inline_template('range is <%= @o.inspect %>'))
20 EOS
21
22 apply_manifest(pp, :catch_failures => true) do |r|
23 expect(r.stdout).to match(/range is \["a", "c"\]/)
24 end
25 end
26 it 'ranges letters with a negative step'
27 it 'ranges numbers'
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'
32 end
33 describe 'failure' do
34 it 'fails with no arguments'
35 end
36end
Note: See TracBrowser for help on using the repository browser.