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 <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud 2015-09-10 10:53:04 +02:00
parent 4fde6bccf1
commit 2a618ff54f
1 changed files with 7 additions and 4 deletions

View File

@ -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=<SERVICE DEFAULT>') }
it { is_expected.to exist }
it { is_expected.to contain('thisshouldexist=foo') }
it { is_expected.to contain('thisshouldexist2=<SERVICE DEFAULT>') }
its(:content) { should_not match /thisshouldnotexist/ }
describe '#content' do
subject { super().content }
it { is_expected.to_not match /thisshouldnotexist/ }
end
end