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
|
-
Property svn:executable
set to
*
|
File size:
883 bytes
|
Line | |
---|
1 | require 'spec_helper'
|
---|
2 |
|
---|
3 | describe 'bool2str' do
|
---|
4 | it { is_expected.not_to eq(nil) }
|
---|
5 | it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) }
|
---|
6 | [ 'true', 'false', nil, :undef, ''].each do |invalid|
|
---|
7 | it { is_expected.to run.with_params(invalid).and_raise_error(Puppet::ParseError) }
|
---|
8 | end
|
---|
9 | it { is_expected.to run.with_params(true, 'yes', 'no', 'maybe').and_raise_error(Puppet::ParseError) }
|
---|
10 | it { is_expected.to run.with_params(true, 'maybe').and_raise_error(Puppet::ParseError) }
|
---|
11 | it { is_expected.to run.with_params(true, 0, 1).and_raise_error(Puppet::ParseError) }
|
---|
12 | it { is_expected.to run.with_params(true).and_return("true") }
|
---|
13 | it { is_expected.to run.with_params(false).and_return("false") }
|
---|
14 | it { is_expected.to run.with_params(true, 'yes', 'no').and_return("yes") }
|
---|
15 | it { is_expected.to run.with_params(false, 'yes', 'no').and_return("no") }
|
---|
16 |
|
---|
17 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.