From f1edd2715a755573d7578839a3efe8473b79b5c5 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Tue, 6 Sep 2016 11:18:48 +0100 Subject: (MODULES-3737) validate_legacy: refactoring * validate_legacy now accepts undef values * update the TypeMismatch message to include the original validate function name * only notice, not warn, on newly allowed values * changed previous_validation to function_name to avoid confusion with the function of the same name * use deprecation() instead of warn(), when hitting a deprecated value * prepare the tests and function for MODULES-3735 * rewrite validate_legacy tests to use new rspec-puppet * move validate_re deprecation to puppet4 only * adapt validate_re_spec --- spec/functions/validate_re_spec.rb | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'spec/functions/validate_re_spec.rb') diff --git a/spec/functions/validate_re_spec.rb b/spec/functions/validate_re_spec.rb index 2ee3f47..2fa9ddd 100755 --- a/spec/functions/validate_re_spec.rb +++ b/spec/functions/validate_re_spec.rb @@ -28,22 +28,6 @@ describe 'validate_re' do end describe 'invalid inputs' do - it { - pending('should implement stricter type checking') - is_expected.to run.with_params([], '').and_raise_error(Puppet::ParseError, /is not a String/) - } - it { - pending('should implement stricter type checking') - is_expected.to run.with_params('', {}).and_raise_error(Puppet::ParseError, /is not an Array/) - } - it { - pending('should implement stricter type checking') - is_expected.to run.with_params('', '', []).and_raise_error(Puppet::ParseError, /is not a String/) - } - it { - pending('should implement stricter type checking') - is_expected.to run.with_params(nil, nil).and_raise_error(Puppet::ParseError, /is not a String/) - } it { is_expected.to run.with_params('', []).and_raise_error(Puppet::ParseError, /does not match/) } it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, /does not match/) } it { is_expected.to run.with_params('', 'two').and_raise_error(Puppet::ParseError, /does not match/) } -- cgit v1.2.3