1 require 'spec_helper_acceptance'
3 describe 'validate_slength function' do
6 $one = 'discombobulate'
8 validate_slength($one,$two)
10 it 'validates a single string max' do
11 apply_manifest(pp1, :catch_failures => true)
15 $one = ['discombobulate', 'moo']
17 validate_slength($one,$two)
19 it 'validates multiple string maxes' do
20 apply_manifest(pp2, :catch_failures => true)
24 $one = ['discombobulate', 'moo']
27 validate_slength($one,$two,$three)
29 it 'validates min/max of strings in array' do
30 apply_manifest(pp3, :catch_failures => true)
34 $one = 'discombobulate'
36 validate_slength($one,$two)
38 it 'validates a single string max of incorrect length' do
39 apply_manifest(pp4, :expect_failures => true)
43 $one = ['discombobulate', 'moo']
45 validate_slength($one,$two)
47 it 'validates multiple string maxes of incorrect length' do
48 apply_manifest(pp5, :expect_failures => true)
52 $one = ['discombobulate', 'moo']
55 validate_slength($one,$two,$three)
57 it 'validates multiple strings min/maxes of incorrect length' do
58 apply_manifest(pp6, :expect_failures => true)
62 it 'handles improper number of arguments'
63 it 'handles improper first argument type'
64 it 'handles non-strings in array of first argument'
65 it 'handles improper second argument type'
66 it 'handles improper third argument type'
67 it 'handles negative ranges'
68 it 'handles improper ranges'