projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove old cleanup rule
[mirror/dsa-puppet.git]
/
3rdparty
/
modules
/
stdlib
/
spec
/
acceptance
/
size_spec.rb
diff --git
a/3rdparty/modules/stdlib/spec/acceptance/size_spec.rb
b/3rdparty/modules/stdlib/spec/acceptance/size_spec.rb
old mode 100755
(executable)
new mode 100644
(file)
index
a52b778
..
e84e665
--- a/
3rdparty/modules/stdlib/spec/acceptance/size_spec.rb
+++ b/
3rdparty/modules/stdlib/spec/acceptance/size_spec.rb
@@
-1,50
+1,48
@@
-#! /usr/bin/env ruby -S rspec
require 'spec_helper_acceptance'
require 'spec_helper_acceptance'
-describe 'size function', :
unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))
do
+describe 'size function', :
if => Puppet::Util::Package.versioncmp(return_puppet_version, '6.0.0') < 0
do
describe 'success' do
describe 'success' do
- it 'single string size' do
- pp = <<-EOS
+ pp1 = <<-DOC
$a = 'discombobulate'
$o = size($a)
notice(inline_template('size is <%= @o.inspect %>'))
$a = 'discombobulate'
$o = size($a)
notice(inline_template('size is <%= @o.inspect %>'))
- EOS
-
- apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to match(
/size is 14/
)
+ DOC
+ it 'single string size' do
+ apply_manifest(pp
1
, :catch_failures => true) do |r|
+ expect(r.stdout).to match(
%r{size is 14}
)
end
end
end
end
- it 'with empty string' do
- pp = <<-EOS
+
+ pp2 = <<-DOC
$a = ''
$o = size($a)
notice(inline_template('size is <%= @o.inspect %>'))
$a = ''
$o = size($a)
notice(inline_template('size is <%= @o.inspect %>'))
- EOS
-
- apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to match(
/size is 0/
)
+ DOC
+ it 'with empty string' do
+ apply_manifest(pp
2
, :catch_failures => true) do |r|
+ expect(r.stdout).to match(
%r{size is 0}
)
end
end
end
end
- it 'with undef' do
- pp = <<-EOS
+
+ pp3 = <<-DOC
$a = undef
$o = size($a)
notice(inline_template('size is <%= @o.inspect %>'))
$a = undef
$o = size($a)
notice(inline_template('size is <%= @o.inspect %>'))
- EOS
-
- apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to match(
/size is 0/
)
+ DOC
+ it 'with undef' do
+ apply_manifest(pp
3
, :catch_failures => true) do |r|
+ expect(r.stdout).to match(
%r{size is 0}
)
end
end
end
end
- it 'strings in array' do
- pp = <<-EOS
+
+ pp4 = <<-DOC
$a = ['discombobulate', 'moo']
$o = size($a)
notice(inline_template('size is <%= @o.inspect %>'))
$a = ['discombobulate', 'moo']
$o = size($a)
notice(inline_template('size is <%= @o.inspect %>'))
- EOS
-
- apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to match(
/size is 2/
)
+ DOC
+ it 'strings in array' do
+ apply_manifest(pp
4
, :catch_failures => true) do |r|
+ expect(r.stdout).to match(
%r{size is 2}
)
end
end
end
end
end
end