1 require 'spec_helper_acceptance'
3 describe 'count function' do
7 $output = count($input)
10 it 'counts elements in an array' do
11 apply_manifest(pp1, :catch_failures => true) do |r|
12 expect(r.stdout).to match(%r{Notice: 4})
18 $output = count($input, 1)
21 it 'counts elements in an array that match a second argument' do
22 apply_manifest(pp2, :catch_failures => true) do |r|
23 expect(r.stdout).to match(%r{Notice: 3})