2011-06-29 22:21:55 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2015-06-01 13:21:59 +02:00
|
|
|
describe 'empty' do
|
|
|
|
it { is_expected.not_to eq(nil) }
|
|
|
|
it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) }
|
|
|
|
it {
|
|
|
|
pending("Current implementation ignores parameters after the first.")
|
|
|
|
is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError)
|
|
|
|
}
|
2015-09-22 18:05:37 +02:00
|
|
|
it { is_expected.to run.with_params(0).and_return(false) }
|
2015-06-01 13:21:59 +02:00
|
|
|
it { is_expected.to run.with_params('').and_return(true) }
|
|
|
|
it { is_expected.to run.with_params('one').and_return(false) }
|
2011-06-29 22:21:55 +02:00
|
|
|
|
2015-06-01 13:21:59 +02:00
|
|
|
it { is_expected.to run.with_params(AlsoString.new('')).and_return(true) }
|
|
|
|
it { is_expected.to run.with_params(AlsoString.new('one')).and_return(false) }
|
2011-06-29 22:21:55 +02:00
|
|
|
|
2015-06-01 13:21:59 +02:00
|
|
|
it { is_expected.to run.with_params([]).and_return(true) }
|
|
|
|
it { is_expected.to run.with_params(['one']).and_return(false) }
|
2011-06-30 00:37:37 +02:00
|
|
|
|
2015-06-01 13:21:59 +02:00
|
|
|
it { is_expected.to run.with_params({}).and_return(true) }
|
|
|
|
it { is_expected.to run.with_params({'key' => 'value'}).and_return(false) }
|
2011-06-29 22:21:55 +02:00
|
|
|
end
|