]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/stdlib/spec/acceptance/difference_spec.rb
upgrade to stdlib 4.6.1
[dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / difference_spec.rb
1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
3
4 describe 'difference function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5   describe 'success' do
6     it 'returns non-duplicates in the first array' do
7       pp = <<-EOS
8       $a = ['a','b','c']
9       $b = ['b','c','d']
10       $c = ['a']
11       $o = difference($a, $b)
12       if $o == $c {
13         notify { 'output correct': }
14       }
15       EOS
16
17       apply_manifest(pp, :catch_failures => true) do |r|
18         expect(r.stdout).to match(/Notice: output correct/)
19       end
20     end
21   end
22   describe 'failure' do
23     it 'handles non-array arguments'
24     it 'handles improper argument counts'
25   end
26 end