Fix Rspec 3.x new is_expected.[to|to_not| keywords

Some 'should' keyword have been forgotten during the rspec2.x to
rspec3.x updates. This patch fixes that!

Change-Id: I4acffbbfb051fce7f48d401812fce2c1afcc137d
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud 2015-03-27 09:15:39 +01:00
parent dc047a0f01
commit e0bf023733
4 changed files with 14 additions and 14 deletions

View File

@ -166,7 +166,7 @@ describe 'heat' do
it { is_expected.to contain_heat_config('paste_deploy/flavor').with_value('keystone') }
it 'keeps keystone secrets secret' do
should contain_heat_config('keystone_authtoken/admin_password').with_secret(true)
is_expected.to contain_heat_config('keystone_authtoken/admin_password').with_secret(true)
end
@ -431,7 +431,7 @@ describe 'heat' do
})
end
it 'configures identity_uri' do
should contain_heat_config('keystone_authtoken/identity_uri').with_value("https://foo.bar:1234/");
is_expected.to contain_heat_config('keystone_authtoken/identity_uri').with_value("https://foo.bar:1234/");
end
end
@ -443,11 +443,11 @@ describe 'heat' do
})
end
it 'configures identity_uri and auth_uri but deprecates old auth settings' do
should contain_heat_config('keystone_authtoken/identity_uri').with_value("https://foo.bar:35357/");
should contain_heat_config('keystone_authtoken/auth_uri').with_value("https://foo.bar:5000/v2.0/");
should contain_heat_config('keystone_authtoken/auth_port').with(:ensure => 'absent')
should contain_heat_config('keystone_authtoken/auth_protocol').with(:ensure => 'absent')
should contain_heat_config('keystone_authtoken/auth_host').with(:ensure => 'absent')
is_expected.to contain_heat_config('keystone_authtoken/identity_uri').with_value("https://foo.bar:35357/");
is_expected.to contain_heat_config('keystone_authtoken/auth_uri').with_value("https://foo.bar:5000/v2.0/");
is_expected.to contain_heat_config('keystone_authtoken/auth_port').with(:ensure => 'absent')
is_expected.to contain_heat_config('keystone_authtoken/auth_protocol').with(:ensure => 'absent')
is_expected.to contain_heat_config('keystone_authtoken/auth_host').with(:ensure => 'absent')
end
end
@ -459,13 +459,13 @@ describe 'heat' do
end
it 'has instance_user set when specified' do
should contain_heat_config('DEFAULT/instance_user').with_value('fred')
is_expected.to contain_heat_config('DEFAULT/instance_user').with_value('fred')
end
end
shared_examples_for 'without instance_user set' do
it 'doesnt have instance_user set by default' do
should contain_heat_config('DEFAULT/instance_user').with_enure('absent')
is_expected.to contain_heat_config('DEFAULT/instance_user').with_enure('absent')
end
end

View File

@ -69,7 +69,7 @@ describe 'heat::keystone::auth_cfn' do
:configure_service => false
})
end
it { should_not contain_keystone_service("#{params[:region]}/#{params[:auth_name]}") }
it { is_expected.to_not contain_keystone_service("#{params[:region]}/#{params[:auth_name]}") }
end
end

View File

@ -76,7 +76,7 @@ describe 'heat::keystone::auth' do
:configure_service => false
})
end
it { should_not contain_keystone_service("#{params[:region]}/#{params[:auth_name]}") }
it { is_expected.to_not contain_keystone_service("#{params[:region]}/#{params[:auth_name]}") }
end
end

View File

@ -15,9 +15,9 @@ describe 'heat::keystone::domain' do
shared_examples_for 'heat keystone domain' do
it 'configure heat.conf' do
should contain_heat_config('DEFAULT/stack_domain_admin').with_value(params[:domain_admin])
should contain_heat_config('DEFAULT/stack_domain_admin_password').with_value(params[:domain_password])
should contain_heat_config('DEFAULT/stack_domain_admin_password').with_secret(true)
is_expected.to contain_heat_config('DEFAULT/stack_domain_admin').with_value(params[:domain_admin])
is_expected.to contain_heat_config('DEFAULT/stack_domain_admin_password').with_value(params[:domain_password])
is_expected.to contain_heat_config('DEFAULT/stack_domain_admin_password').with_secret(true)
end
it 'should configure heat domain id' do