Mercurial > repos > other > Puppet
comparison modules/stdlib/spec/acceptance/hash_spec.rb @ 272:c42fb28cff86
Update to a newer Python module
This also pulls in an EPEL module (which we don't use) and a newer
stdlib version.
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 03 Jan 2020 19:56:04 +0000 |
parents | addb0ea390a1 |
children |
comparison
equal
deleted
inserted
replaced
271:c62728474654 | 272:c42fb28cff86 |
---|---|
1 #! /usr/bin/env ruby -S rspec | |
2 require 'spec_helper_acceptance' | 1 require 'spec_helper_acceptance' |
3 | 2 |
4 describe 'hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do | 3 describe 'hash function' do |
5 describe 'success' do | 4 describe 'success' do |
6 it 'hashs arrays' do | 5 pp = <<-DOC |
7 pp = <<-EOS | |
8 $a = ['aaa','bbb','bbb','ccc','ddd','eee'] | 6 $a = ['aaa','bbb','bbb','ccc','ddd','eee'] |
9 $b = { 'aaa' => 'bbb', 'bbb' => 'ccc', 'ddd' => 'eee' } | 7 $b = { 'aaa' => 'bbb', 'bbb' => 'ccc', 'ddd' => 'eee' } |
10 $o = hash($a) | 8 $o = hash($a) |
11 if $o == $b { | 9 if $o == $b { |
12 notify { 'output correct': } | 10 notify { 'output correct': } |
13 } | 11 } |
14 EOS | 12 DOC |
15 | 13 it 'hashs arrays' do |
16 apply_manifest(pp, :catch_failures => true) do |r| | 14 apply_manifest(pp, :catch_failures => true) do |r| |
17 expect(r.stdout).to match(/Notice: output correct/) | 15 expect(r.stdout).to match(%r{Notice: output correct}) |
18 end | 16 end |
19 end | 17 end |
20 it 'handles odd-length arrays' | 18 it 'handles odd-length arrays' |
21 end | 19 end |
22 describe 'failure' do | 20 describe 'failure' do |