diff options
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/functions/getvar_spec.rb | 9 | ||||
-rwxr-xr-x | spec/functions/validate_slength_spec.rb | 2 | ||||
-rwxr-xr-x | spec/spec_helper_acceptance.rb | 4 |
3 files changed, 5 insertions, 10 deletions
diff --git a/spec/functions/getvar_spec.rb b/spec/functions/getvar_spec.rb index 37125d1..6ab137e 100755 --- a/spec/functions/getvar_spec.rb +++ b/spec/functions/getvar_spec.rb @@ -16,13 +16,6 @@ describe 'getvar' do it { is_expected.to run.with_params('site::data::foo').and_return('baz') } it { is_expected.to run.with_params('::site::data::foo').and_return('baz') } - - context 'with strict variable checking', :if => RSpec.configuration.strict_variables do - it { is_expected.to run.with_params('::site::data::bar').and_raise_error(ArgumentError, /undefined_variable/) } - end - - context 'without strict variable checking', :unless => RSpec.configuration.strict_variables do - it { is_expected.to run.with_params('::site::data::bar').and_return(nil) } - end + it { is_expected.to run.with_params('::site::data::bar').and_return(nil) } end end diff --git a/spec/functions/validate_slength_spec.rb b/spec/functions/validate_slength_spec.rb index 391f83a..5a8fa6a 100755 --- a/spec/functions/validate_slength_spec.rb +++ b/spec/functions/validate_slength_spec.rb @@ -10,7 +10,7 @@ describe 'validate_slength' do it { is_expected.to run.with_params('', -1).and_raise_error(Puppet::ParseError, /second argument to be a positive Numeric/) } it { is_expected.to run.with_params('', 1, '').and_raise_error(Puppet::ParseError, /third argument to be unset or a positive Numeric/) } it { is_expected.to run.with_params('', 1, -1).and_raise_error(Puppet::ParseError, /third argument to be unset or a positive Numeric/) } - it { is_expected.to run.with_params('', 1, 2).and_raise_error(Puppet::ParseError, /argument to be larger than third argument/) } + it { is_expected.to run.with_params('', 1, 2).and_raise_error(Puppet::ParseError, /argument to be equal to or larger than third argument/) } end context "with a maximum length of 10" do diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 3d9574b..39d2d52 100755 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -43,7 +43,9 @@ RSpec.configure do |c| end def is_future_parser_enabled? - if default[:default_apply_opts] + if default[:type] == 'aio' + return true + elsif default[:default_apply_opts] return default[:default_apply_opts][:parser] == 'future' end return false |