From a06803d0417addcb4f5adbd59abc8bc7d427d181 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 24 Apr 2017 10:20:20 -0700 Subject: [PATCH] (maint) Unit test fixes --- spec/classes/apt_backports_spec.rb | 10 +++++----- spec/defines/key_compat_spec.rb | 4 ++-- spec/defines/key_spec.rb | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/classes/apt_backports_spec.rb b/spec/classes/apt_backports_spec.rb index c0d54a2..aae4bb0 100644 --- a/spec/classes/apt_backports_spec.rb +++ b/spec/classes/apt_backports_spec.rb @@ -224,7 +224,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a String value/) + }.to raise_error(Puppet::Error, /expects a value of type Undef or String/) end end context 'invalid release' do @@ -236,7 +236,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a String value/) + }.to raise_error(Puppet::Error, /expects a value of type Undef or String/) end end context 'invalid repos' do @@ -248,7 +248,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a String value/) + }.to raise_error(Puppet::Error, /expects a value of type Undef or String/) end end context 'invalid key' do @@ -260,7 +260,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a value of type String or Hash, got Boolean/) + }.to raise_error(Puppet::Error, /expects a value of type Undef, String, or Hash, got Boolean/) end end context 'invalid pin' do @@ -272,7 +272,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a value of type Integer, String, or Hash, got Boolean/) + }.to raise_error(Puppet::Error, /expects a value of type Undef, Integer, String, or Hash, got Boolean/) end end end diff --git a/spec/defines/key_compat_spec.rb b/spec/defines/key_compat_spec.rb index f6013d3..66e9f7f 100644 --- a/spec/defines/key_compat_spec.rb +++ b/spec/defines/key_compat_spec.rb @@ -246,7 +246,7 @@ describe 'apt::key', :type => :define do :content => [], } end it 'fails' do - expect { subject.call }.to raise_error(/expects a String value/) + expect { subject.call }.to raise_error(/expects a value of type Undef or String/) end end @@ -264,7 +264,7 @@ describe 'apt::key', :type => :define do :options => {}, } end it 'fails' do - expect { subject.call }.to raise_error(/expects a String value/) + expect { subject.call }.to raise_error(/expects a value of type Undef or String/) end end diff --git a/spec/defines/key_spec.rb b/spec/defines/key_spec.rb index 1f878c3..13616d9 100644 --- a/spec/defines/key_spec.rb +++ b/spec/defines/key_spec.rb @@ -251,7 +251,7 @@ describe 'apt::key' do :content => [], } end it 'fails' do - expect { subject.call }.to raise_error(/expects a String value/) + expect { subject.call }.to raise_error(/expects a value of type Undef or String/) end end @@ -269,7 +269,7 @@ describe 'apt::key' do :options => {}, } end it 'fails' do - expect { subject.call }.to raise_error(/expects a String value/) + expect { subject.call }.to raise_error(/expects a value of type Undef or String/) end end -- 2.45.2