diff options
Diffstat (limited to 'spec/acceptance/keys_spec.rb')
-rwxr-xr-x | spec/acceptance/keys_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/acceptance/keys_spec.rb b/spec/acceptance/keys_spec.rb new file mode 100755 index 0000000..176918e --- /dev/null +++ b/spec/acceptance/keys_spec.rb @@ -0,0 +1,23 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'keys function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'keyss hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb','ccc'=>'ddd'} + $o = keys($a) + notice(inline_template('keys is <%= @o.sort.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/keys is \["aaa", "ccc"\]/) + end + end + it 'handles non hashes' + it 'handles empty hashes' + end + describe 'failure' do + it 'handles improper argument counts' + end +end |