1 require 'spec_helper_acceptance'
3 describe 'validate_re function' do
10 it 'validates a string' do
11 apply_manifest(pp1, :catch_failures => true)
16 $two = ['^one$', '^two']
17 validate_re($one,$two)
19 it 'validates an array' do
20 apply_manifest(pp2, :catch_failures => true)
25 $two = ['^two$', '^three']
26 validate_re($one,$two)
28 it 'validates a failed array' do
29 apply_manifest(pp3, :expect_failures => true)
35 validate_re($one,$two,"The $puppetversion fact does not match 2.7")
37 it 'validates a failed array with a custom error message' do
38 expect(apply_manifest(pp4, :expect_failures => true).stderr).to match(%r{does not match})
43 it 'handles improper number of arguments'
44 it 'handles improper argument types'