projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update puppetlabs/stdlib module
[mirror/dsa-puppet.git]
/
3rdparty
/
modules
/
stdlib
/
spec
/
acceptance
/
validate_slength_spec.rb
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
(executable)
new mode 100644
(file)
index
c29fd23
..
afbb97b
--- 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' do
describe 'success' do
require 'spec_helper_acceptance'
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)
$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(pp
1
, :catch_failures => true)
end
end
- it 'validates multiple string maxes' do
- pp = <<-EOS
+
+ pp2 = <<-DOC
$one = ['discombobulate', 'moo']
$two = 17
validate_slength($one,$two)
$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(pp
2
, :catch_failures => true)
end
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)
$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(pp
3
, :catch_failures => true)
end
end
- it 'validates a single string max of incorrect length' do
- pp = <<-EOS
+
+ pp4 = <<-DOC
$one = 'discombobulate'
$two = 1
validate_slength($one,$two)
$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(pp
4
, :expect_failures => true)
end
end
- it 'validates multiple string maxes of incorrect length' do
- pp = <<-EOS
+
+ pp5 = <<-DOC
$one = ['discombobulate', 'moo']
$two = 3
validate_slength($one,$two)
$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(pp
5
, :expect_failures => true)
end
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)
$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(pp
6
, :expect_failures => true)
end
end
describe 'failure' do
end
end
describe 'failure' do