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: Ie93c2ee4a33b9c526f1a4f175aab529b238b5c2e Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
parent
bce0eac01c
commit
0860b66fdc
@ -87,27 +87,36 @@ describe 'basic glance config resource' do
|
||||
end
|
||||
|
||||
describe file('/etc/glance/glance-api.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.not_to match /thisshouldnotexist/ }
|
||||
end
|
||||
end
|
||||
|
||||
describe file('/etc/glance/glance-registry.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.not_to match /thisshouldnotexist/ }
|
||||
end
|
||||
end
|
||||
|
||||
describe file('/etc/glance/glance-cache.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.not_to match /thisshouldnotexist/ }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user