From ce641f26894c95736d1e80b11390efbbb5b49b4b Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Sun, 19 Jul 2015 21:21:11 +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. Change-Id: Ib621ab180d3c76e0afafd4b06d264cad11e600de Signed-off-by: Gael Chamoulaud --- spec/acceptance/basic_nova_spec.rb | 2 +- spec/classes/nova_compute_rbd_spec.rb | 8 ++++---- spec/type/nova_aggregate_spec.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/acceptance/basic_nova_spec.rb b/spec/acceptance/basic_nova_spec.rb index 5a0d66fab..cd1415e0e 100644 --- a/spec/acceptance/basic_nova_spec.rb +++ b/spec/acceptance/basic_nova_spec.rb @@ -136,7 +136,7 @@ describe 'basic nova' do end describe cron do - it { should have_entry('1 0 * * * nova-manage db archive_deleted_rows --max_rows 100 >>/var/log/nova/nova-rowsflush.log 2>&1').with_user('nova') } + it { is_expected.to have_entry('1 0 * * * nova-manage db archive_deleted_rows --max_rows 100 >>/var/log/nova/nova-rowsflush.log 2>&1').with_user('nova') } end end diff --git a/spec/classes/nova_compute_rbd_spec.rb b/spec/classes/nova_compute_rbd_spec.rb index 848ce8037..d98ee8cc1 100644 --- a/spec/classes/nova_compute_rbd_spec.rb +++ b/spec/classes/nova_compute_rbd_spec.rb @@ -116,10 +116,10 @@ describe 'nova::compute::rbd' do end it 'should only set user and secret_uuid in nova.conf ' do - should_not contain_nova_config('libvirt/images_rbd_pool').with_value('rbd') - should_not contain_nova_config('libvirt/images_rbd_ceph_conf').with_value('/etc/ceph/ceph.conf') - should contain_nova_config('libvirt/rbd_user').with_value('nova') - should contain_nova_config('libvirt/rbd_secret_uuid').with_value('UUID') + is_expected.to_not contain_nova_config('libvirt/images_rbd_pool').with_value('rbd') + is_expected.to_not contain_nova_config('libvirt/images_rbd_ceph_conf').with_value('/etc/ceph/ceph.conf') + is_expected.to contain_nova_config('libvirt/rbd_user').with_value('nova') + is_expected.to contain_nova_config('libvirt/rbd_secret_uuid').with_value('UUID') end it 'configure ceph on compute nodes' do diff --git a/spec/type/nova_aggregate_spec.rb b/spec/type/nova_aggregate_spec.rb index e3bcb0340..de300b1e7 100644 --- a/spec/type/nova_aggregate_spec.rb +++ b/spec/type/nova_aggregate_spec.rb @@ -16,7 +16,7 @@ describe Puppet::Type.type(:nova_aggregate) do end it "should be able to create an instance" do - described_class.new(:name => 'agg0').should_not be_nil + expect(described_class.new(:name => 'agg0')).not_to be_nil end it "should be able to create an more complex instance" do