Sha256: 645ecd17e5d5a241d1cd5ece239f672ad3d820845fa76e6b07ca0197a60fc1d0

Contents?: true

Size: 714 Bytes

Versions: 6

Compression:

Stored size: 714 Bytes

Contents

#! /usr/bin/env ruby -S rspec
require 'spec_helper_acceptance'

describe 'hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
  describe 'success' do
    it 'hashs arrays' do
      pp = <<-EOS
      $a = ['aaa','bbb','bbb','ccc','ddd','eee']
      $b = { 'aaa' => 'bbb', 'bbb' => 'ccc', 'ddd' => 'eee' }
      $o = hash($a)
      if $o == $b {
        notify { 'output correct': }
      }
      EOS

      apply_manifest(pp, :catch_failures => true) do |r|
        expect(r.stdout).to match(/Notice: output correct/)
      end
    end
    it 'handles odd-length arrays'
  end
  describe 'failure' do
    it 'handles improper argument counts'
    it 'handles non-arrays'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puppet-retrospec-0.12.1 spec/fixtures/modules/stdlib/spec/acceptance/hash_spec.rb
puppet-retrospec-0.12.0 spec/fixtures/modules/stdlib/spec/acceptance/hash_spec.rb
puppet-retrospec-0.11.0 spec/fixtures/modules/stdlib/spec/acceptance/hash_spec.rb
puppet-retrospec-0.10.0 spec/fixtures/modules/stdlib/spec/acceptance/hash_spec.rb
puppet-retrospec-0.9.1 spec/fixtures/modules/stdlib/spec/acceptance/hash_spec.rb
puppet-retrospec-0.9.0 spec/fixtures/modules/stdlib/spec/acceptance/hash_spec.rb