source: src/puppetcode/environments/test/modules/stdlib/spec/functions/dig_spec.rb@ c951931

0.5 app-cordova debian/bullseye debian/jessie
Last change on this file since c951931 was 1c22429, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago
  • gnuboat_epd adds the apt repository from gnuboat to install epd-fuse package
  • Property mode set to 100644
File size: 687 bytes
Line 
1require 'spec_helper'
2
3describe 'dig' do
4 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) }
5 it { is_expected.to run.with_params('bad', []).and_raise_error(Puppet::ParseError) }
6 it { is_expected.to run.with_params({}, 'bad').and_raise_error(Puppet::ParseError) }
7
8 it { is_expected.to run.with_params({}, []).and_return({}) }
9 it { is_expected.to run.with_params({"a" => "b"}, ["a"]).and_return("b") }
10 it { is_expected.to run.with_params({"a" => {"b" => "c"}}, ["a", "b"]).and_return("c") }
11 it { is_expected.to run.with_params({}, ["a", "b"], "d").and_return("d") }
12 it { is_expected.to run.with_params({"a" => false}, ["a"]).and_return(false) }
13end
Note: See TracBrowser for help on using the repository browser.