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

Last change on this file since 30960 was 30960, checked in by davidb, 7 years ago

Switch to using Puppet to provision machine. Strongly based on files developed for spark-hdfs cluster

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.