source: other-projects/hathitrust/vagrant-hadoop-cluster/trunk/modules/stdlib/spec/aliases/bool_spec.rb@ 30903

Last change on this file since 30903 was 30903, checked in by davidb, 8 years ago

Vagrant provisioning files for a 4-node Hadoop cluster. See README.txt for more details

File size: 708 bytes
Line 
1require 'spec_helper'
2
3if Puppet.version.to_f >= 4.5
4 describe 'test::bool', type: :class do
5 describe 'accepts booleans' do
6 [
7 true,
8 false,
9 ].each do |value|
10 describe value.inspect do
11 let(:params) {{ value: value }}
12 it { is_expected.to compile }
13 end
14 end
15 end
16
17 describe 'rejects other values' do
18 [
19 [1],
20 [{}],
21 [true],
22 'true',
23 'false',
24 ].each do |value|
25 describe value.inspect do
26 let(:params) {{ value: value }}
27 it { is_expected.to compile.and_raise_error(/parameter 'value' expects a Stdlib::Compat::Bool/) }
28 end
29 end
30 end
31 end
32end
Note: See TracBrowser for help on using the repository browser.