Update stdlib
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / empty_spec.rb
index 8b46aac..97b7333 100755 (executable)
@@ -1,7 +1,7 @@
 #! /usr/bin/env ruby -S rspec
 require 'spec_helper_acceptance'
 
-describe 'empty function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+describe 'empty function' do
   describe 'success' do
     it 'recognizes empty strings' do
       pp = <<-EOS
@@ -27,6 +27,20 @@ describe 'empty function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('opera
       }
       EOS
 
+      apply_manifest(pp, :catch_failures => true) do |r|
+        expect(r.stdout).to match(/Notice: output correct/)
+      end
+    end
+    it 'handles numerical values' do
+      pp = <<-EOS
+      $a = 7
+      $b = false
+      $o = empty($a)
+      if $o == $b {
+        notify { 'output correct': }
+      }
+      EOS
+
       apply_manifest(pp, :catch_failures => true) do |r|
         expect(r.stdout).to match(/Notice: output correct/)
       end