From 2a618ff54f059be34549949197018cad36467374 Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Thu, 10 Sep 2015 10:53:04 +0200 Subject: [PATCH] Fix rspec 3.x syntax - Convert 'should' keyword to 'is_expected.to', - The old ':should' syntax in rspec 3.x is deprecated in favor of ':expect' syntax, - Expectations on attribute of subject with 'its'. Change-Id: I99d7819595a51c16b0b82122d75c0a6ebfad7907 Signed-off-by: Gael Chamoulaud --- spec/acceptance/designate_config_spec.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/designate_config_spec.rb b/spec/acceptance/designate_config_spec.rb index f9e6c626..bd3c1f36 100644 --- a/spec/acceptance/designate_config_spec.rb +++ b/spec/acceptance/designate_config_spec.rb @@ -43,11 +43,14 @@ describe 'basic designate_config resource' do end describe file('/etc/designate/designate.conf') do - it { should exist } - it { should contain('thisshouldexist=foo') } - it { should contain('thisshouldexist2=') } + it { is_expected.to exist } + it { is_expected.to contain('thisshouldexist=foo') } + it { is_expected.to contain('thisshouldexist2=') } - its(:content) { should_not match /thisshouldnotexist/ } + describe '#content' do + subject { super().content } + it { is_expected.to_not match /thisshouldnotexist/ } + end end