1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'count function' do
6 it 'should count elements in an array' do
9 $output = count($input)
13 apply_manifest(pp, :catch_failures => true) do |r|
14 expect(r.stdout).to match(/Notice: 4/)
18 it 'should count elements in an array that match a second argument' do
21 $output = count($input, 1)
25 apply_manifest(pp, :catch_failures => true) do |r|
26 expect(r.stdout).to match(/Notice: 3/)