Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / clamp_spec.rb
old mode 100755 (executable)
new mode 100644 (file)
index e8ccb96..9885f56
@@ -1,10 +1,8 @@
-#! /usr/bin/env ruby -S rspec
 require 'spec_helper_acceptance'
 
 describe 'clamp function' do
   describe 'success' do
-    it 'clamps list of values' do
-      pp = <<-EOS
+    pp1 = <<-DOC
       $x = 17
       $y = 225
       $z = 155
@@ -12,24 +10,24 @@ describe 'clamp function' do
       if $o == $z {
         notify { 'output correct': }
       }
-      EOS
-
-      apply_manifest(pp, :catch_failures => true) do |r|
-        expect(r.stdout).to match(/Notice: output correct/)
+    DOC
+    it 'clamps list of values' do
+      apply_manifest(pp1, :catch_failures => true) do |r|
+        expect(r.stdout).to match(%r{Notice: output correct})
       end
     end
-    it 'clamps array of values' do
-      pp = <<-EOS
+
+    pp2 = <<-DOC
       $a = [7, 19, 66]
       $b = 19
       $o = clamp($a)
       if $o == $b {
         notify { 'output correct': }
       }
-      EOS
-
-      apply_manifest(pp, :catch_failures => true) do |r|
-        expect(r.stdout).to match(/Notice: output correct/)
+    DOC
+    it 'clamps array of values' do
+      apply_manifest(pp2, :catch_failures => true) do |r|
+        expect(r.stdout).to match(%r{Notice: output correct})
       end
     end
   end