1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
6 it 'returns an array of values' do
13 $output = values($arg)
14 notice(inline_template('<%= @output.sort.inspect %>'))
16 if is_future_parser_enabled?
17 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 2, 3\]/)
19 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "2", "3"\]/)
25 it 'handles non-hash arguments' do
28 $output = values($arg)
29 notice(inline_template('<%= @output.inspect %>'))
32 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires hash/)