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:
748 bytes
|
Line | |
---|
1 | require 'spec_helper'
|
---|
2 |
|
---|
3 | if ENV["FUTURE_PARSER"] == 'yes'
|
---|
4 | describe 'type_of' do
|
---|
5 | pending 'teach rspec-puppet to load future-only functions under 3.7.5' do
|
---|
6 | it { is_expected.not_to eq(nil) }
|
---|
7 | end
|
---|
8 | end
|
---|
9 | end
|
---|
10 |
|
---|
11 | if Puppet.version.to_f >= 4.0
|
---|
12 | describe 'is_a' do
|
---|
13 | it { is_expected.not_to eq(nil) }
|
---|
14 | it { is_expected.to run.with_params().and_raise_error(ArgumentError) }
|
---|
15 | it { is_expected.to run.with_params('', '').and_raise_error(ArgumentError) }
|
---|
16 |
|
---|
17 | it 'succeeds when comparing a string and a string' do
|
---|
18 | is_expected.to run.with_params('hello world', String).and_return(true)
|
---|
19 | end
|
---|
20 |
|
---|
21 | it 'fails when comparing an integer and a string' do
|
---|
22 | is_expected.to run.with_params(5, String).and_return(false)
|
---|
23 | end
|
---|
24 | end
|
---|
25 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.