Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / unique_spec.rb
old mode 100755 (executable)
new mode 100644 (file)
index bfadad1..614eae5
@@ -1,28 +1,26 @@
-#! /usr/bin/env ruby -S rspec
 require 'spec_helper_acceptance'
 
-describe 'unique function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+describe 'unique function' do
   describe 'success' do
-    it 'uniques arrays' do
-      pp = <<-EOS
+    pp1 = <<-DOC
       $a = ["wallless", "wallless", "brrr", "goddessship"]
       $o = unique($a)
       notice(inline_template('unique is <%= @o.inspect %>'))
-      EOS
-
-      apply_manifest(pp, :catch_failures => true) do |r|
-        expect(r.stdout).to match(/unique is \["wallless", "brrr", "goddessship"\]/)
+    DOC
+    it 'uniques arrays' do
+      apply_manifest(pp1, :catch_failures => true) do |r|
+        expect(r.stdout).to match(%r{unique is \["wallless", "brrr", "goddessship"\]})
       end
     end
-    it 'uniques strings' do
-      pp = <<-EOS
+
+    pp2 = <<-DOC
       $a = "wallless laparohysterosalpingooophorectomy brrr goddessship"
       $o = unique($a)
       notice(inline_template('unique is <%= @o.inspect %>'))
-      EOS
-
-      apply_manifest(pp, :catch_failures => true) do |r|
-        expect(r.stdout).to match(/unique is "wales prohytingcmbd"/)
+    DOC
+    it 'uniques strings' do
+      apply_manifest(pp2, :catch_failures => true) do |r|
+        expect(r.stdout).to match(%r{unique is "wales prohytingcmbd"})
       end
     end
   end