Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / min_spec.rb
old mode 100755 (executable)
new mode 100644 (file)
index 509092d..ea96060
@@ -1,16 +1,14 @@
-#! /usr/bin/env ruby -S rspec
 require 'spec_helper_acceptance'
 
-describe 'min function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+describe 'min function', :if => Puppet::Util::Package.versioncmp(return_puppet_version, '6.0.0') < 0 do
   describe 'success' do
-    it 'mins arrays' do
-      pp = <<-EOS
+    pp = <<-DOC
       $o = min("the","public","art","galleries")
       notice(inline_template('min is <%= @o.inspect %>'))
-      EOS
-
+    DOC
+    it 'mins arrays' do
       apply_manifest(pp, :catch_failures => true) do |r|
-        expect(r.stdout).to match(/min is "art"/)
+        expect(r.stdout).to match(%r{min is "art"})
       end
     end
   end