X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Facceptance%2Fvalidate_slength_spec.rb;h=afbb97b7f1bfb61a8fc6c14620103be25b30ebbb;hb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f;hp=1ab2bb986e8cc6af95629d1d9e184a4ee95fbd7d;hpb=ad88f67c13ae0f1a08936dad643f1e3509ab5f40;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/acceptance/validate_slength_spec.rb b/3rdparty/modules/stdlib/spec/acceptance/validate_slength_spec.rb old mode 100755 new mode 100644 index 1ab2bb986..afbb97b7f --- a/3rdparty/modules/stdlib/spec/acceptance/validate_slength_spec.rb +++ b/3rdparty/modules/stdlib/spec/acceptance/validate_slength_spec.rb @@ -1,63 +1,61 @@ -#! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -describe 'validate_slength function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do +describe 'validate_slength function' do describe 'success' do - it 'validates a single string max' do - pp = <<-EOS + pp1 = <<-DOC $one = 'discombobulate' $two = 17 validate_slength($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) + DOC + it 'validates a single string max' do + apply_manifest(pp1, :catch_failures => true) end - it 'validates multiple string maxes' do - pp = <<-EOS + + pp2 = <<-DOC $one = ['discombobulate', 'moo'] $two = 17 validate_slength($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) + DOC + it 'validates multiple string maxes' do + apply_manifest(pp2, :catch_failures => true) end - it 'validates min/max of strings in array' do - pp = <<-EOS + + pp3 = <<-DOC $one = ['discombobulate', 'moo'] $two = 17 $three = 3 validate_slength($one,$two,$three) - EOS - - apply_manifest(pp, :catch_failures => true) + DOC + it 'validates min/max of strings in array' do + apply_manifest(pp3, :catch_failures => true) end - it 'validates a single string max of incorrect length' do - pp = <<-EOS + + pp4 = <<-DOC $one = 'discombobulate' $two = 1 validate_slength($one,$two) - EOS - - apply_manifest(pp, :expect_failures => true) + DOC + it 'validates a single string max of incorrect length' do + apply_manifest(pp4, :expect_failures => true) end - it 'validates multiple string maxes of incorrect length' do - pp = <<-EOS + + pp5 = <<-DOC $one = ['discombobulate', 'moo'] $two = 3 validate_slength($one,$two) - EOS - - apply_manifest(pp, :expect_failures => true) + DOC + it 'validates multiple string maxes of incorrect length' do + apply_manifest(pp5, :expect_failures => true) end - it 'validates multiple strings min/maxes of incorrect length' do - pp = <<-EOS + + pp6 = <<-DOC $one = ['discombobulate', 'moo'] $two = 17 $three = 10 validate_slength($one,$two,$three) - EOS - - apply_manifest(pp, :expect_failures => true) + DOC + it 'validates multiple strings min/maxes of incorrect length' do + apply_manifest(pp6, :expect_failures => true) end end describe 'failure' do