1 require 'spec_helper_acceptance'
3 describe 'member function' do
4 shared_examples 'item found' do
5 it 'outputs correctly' do
6 apply_manifest(pp, :catch_failures => true) do |r|
7 expect(r.stdout).to match(%r{Notice: output correct})
13 $a = ['aaa','bbb','ccc']
18 notify { 'output correct': }
21 it 'members arrays' do
22 apply_manifest(pp1, :catch_failures => true) do |r|
23 expect(r.stdout).to match(%r{Notice: output correct})
27 describe 'members array of integers' do
30 if member( [1,2,3,4], 4 ){
31 notify { 'output correct': }
36 it_behaves_like 'item found' do
39 describe 'members of mixed array' do
42 if member( ['a','4',3], 'a' ){
43 notify { 'output correct': }
48 it_behaves_like 'item found' do
51 it 'members arrays without members'
55 it 'handles improper argument counts'