From e0bf0237336f553358b6d40446b4cf16fc09f2db Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Fri, 27 Mar 2015 09:15:39 +0100 Subject: [PATCH] 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 --- spec/classes/heat_init_spec.rb | 18 +++++++++--------- spec/classes/heat_keystone_auth_cfn_spec.rb | 2 +- spec/classes/heat_keystone_auth_spec.rb | 2 +- spec/classes/heat_keystone_domain_spec.rb | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index ac1c91bc..1366f3d4 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -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 diff --git a/spec/classes/heat_keystone_auth_cfn_spec.rb b/spec/classes/heat_keystone_auth_cfn_spec.rb index ee2776a2..1b9ab52a 100644 --- a/spec/classes/heat_keystone_auth_cfn_spec.rb +++ b/spec/classes/heat_keystone_auth_cfn_spec.rb @@ -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 diff --git a/spec/classes/heat_keystone_auth_spec.rb b/spec/classes/heat_keystone_auth_spec.rb index e916fea9..ce92909d 100644 --- a/spec/classes/heat_keystone_auth_spec.rb +++ b/spec/classes/heat_keystone_auth_spec.rb @@ -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 diff --git a/spec/classes/heat_keystone_domain_spec.rb b/spec/classes/heat_keystone_domain_spec.rb index 1e222d66..81c1d090 100644 --- a/spec/classes/heat_keystone_domain_spec.rb +++ b/spec/classes/heat_keystone_domain_spec.rb @@ -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