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