Ignore:
Timestamp:
Aug 1, 2017, 3:45:14 PM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, debian/jessie
Children:
ce0f6a4
Parents:
bcf0be5 (diff), cd0f9cc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into debian/jessie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_hash_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_hash function' do
    55  describe 'success' do
    66    it 'validates a single argument' do
    … …  
    2121      apply_manifest(pp, :catch_failures => true)
    2222    end
    23     it 'validates a non-hash' do
    24       {
    25         %{validate_hash('{ "not" => "hash" }')} => "String",
    26         %{validate_hash('string')}              => "String",
    27         %{validate_hash(["array"])}             => "Array",
    28         %{validate_hash(undef)}                 => "String",
    29       }.each do |pp,type|
    30         expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/)
     23    [
     24      %{validate_hash('{ "not" => "hash" }')},
     25      %{validate_hash('string')},
     26      %{validate_hash(["array"])},
     27      %{validate_hash(undef)}
     28    ].each do |pp|
     29      it "rejects #{pp.inspect}" do
     30        expect(apply_manifest(pp, :expect_failures => true).stderr).to match(//)
    3131      end
    3232    end
Note: See TracChangeset for help on using the changeset viewer.