Mercurial > repos > other > Puppet
comparison modules/stdlib/spec/acceptance/hash_spec.rb @ 37:addb0ea390a1 puppet-3.6
Update Puppet "stdlib" module
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 14 Mar 2015 20:09:45 +0000 |
parents | |
children | c42fb28cff86 |
comparison
equal
deleted
inserted
replaced
36:37675581a273 | 37:addb0ea390a1 |
---|---|
1 #! /usr/bin/env ruby -S rspec | |
2 require 'spec_helper_acceptance' | |
3 | |
4 describe 'hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do | |
5 describe 'success' do | |
6 it 'hashs arrays' do | |
7 pp = <<-EOS | |
8 $a = ['aaa','bbb','bbb','ccc','ddd','eee'] | |
9 $b = { 'aaa' => 'bbb', 'bbb' => 'ccc', 'ddd' => 'eee' } | |
10 $o = hash($a) | |
11 if $o == $b { | |
12 notify { 'output correct': } | |
13 } | |
14 EOS | |
15 | |
16 apply_manifest(pp, :catch_failures => true) do |r| | |
17 expect(r.stdout).to match(/Notice: output correct/) | |
18 end | |
19 end | |
20 it 'handles odd-length arrays' | |
21 end | |
22 describe 'failure' do | |
23 it 'handles improper argument counts' | |
24 it 'handles non-arrays' | |
25 end | |
26 end |