1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'has_key function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
6 it 'has_keys in hashes' do
8 $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' }
13 notify { 'output correct': }
17 apply_manifest(pp, :catch_failures => true) do |r|
18 expect(r.stdout).to match(/Notice: output correct/)
21 it 'has_keys not in hashes' do
23 $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' }
28 notify { 'output correct': }
32 apply_manifest(pp, :catch_failures => true) do |r|
33 expect(r.stdout).to match(/Notice: output correct/)
38 it 'handles improper argument counts'
39 it 'handles non-hashes'