From 163dbf3ab019f6052831142037631eb2f0d87514 Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Mon, 13 Oct 2014 22:42:44 -0400 Subject: [PATCH] Fixed should to expect RSpec deprecations --- spec/unit/puppet_x_sensu_totype_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/unit/puppet_x_sensu_totype_spec.rb b/spec/unit/puppet_x_sensu_totype_spec.rb index f3725810bd..6bfa85f705 100644 --- a/spec/unit/puppet_x_sensu_totype_spec.rb +++ b/spec/unit/puppet_x_sensu_totype_spec.rb @@ -13,31 +13,31 @@ class TotypeFixtureClass describe TotypeFixtureClass do let(:helper) { TotypeFixtureClass.new } it 'should be callable with int, and return int' do - helper.to_type(1).should == 1 + expect(helper.to_type(1)).to eq(1) end it 'should be callable with string int, and return int' do - helper.to_type('1').should == 1 + expect(helper.to_type('1')).to eq(1) end it 'should be callable with string, and return string' do - helper.to_type('1 foo').should == '1 foo' + expect(helper.to_type('1 foo')).to eq('1 foo') end it 'should be callable with false' do - helper.to_type(false).should == false + expect(helper.to_type(false)).to eq(false) end it 'should be callable with true' do - helper.to_type(true).should == true + expect(helper.to_type(true)).to eq(true) end it 'should be callable with nil' do - helper.to_type(nil).should == nil + expect(helper.to_type(nil)).to eq(nil) end it 'should be callable with array and return munged array' do - helper.to_type([1, '1', '1 foo', false, true, nil]).should == [1, 1, '1 foo', false, true, nil] + expect(helper.to_type([1, '1', '1 foo', false, true, nil])).to eq([1, 1, '1 foo', false, true, nil]) end it 'should be callable with hash and return munged hash' do - helper.to_type({:a => 1, :b => '1', :c => '1 foo', :d => false, :e => true, :f => nil}).should == {:a => 1, :b => 1, :c => '1 foo', :d => false, :e => true, :f => nil} + expect(helper.to_type({:a => 1, :b => '1', :c => '1 foo', :d => false, :e => true, :f => nil})).to eq({:a => 1, :b => 1, :c => '1 foo', :d => false, :e => true, :f => nil}) end it 'should be able to recurse' do - helper.to_type({:a => 1, :b => '1', :c => '1 foo', :d => false, :e => true, :f => nil, :g => {:a => 1, :b => '1', :c => '1 foo', :d => false, :e => true, :f => nil}, :h => [1, '1', '1 foo', false, true, nil]}).should == {:a => 1, :b => 1, :c => '1 foo', :d => false, :e => true, :f => nil, :g => {:a => 1, :b => 1, :c => '1 foo', :d => false, :e => true, :f => nil}, :h => [1, 1, '1 foo', false, true, nil]} + expect(helper.to_type({:a => 1, :b => '1', :c => '1 foo', :d => false, :e => true, :f => nil, :g => {:a => 1, :b => '1', :c => '1 foo', :d => false, :e => true, :f => nil}, :h => [1, '1', '1 foo', false, true, nil]})).to eq({:a => 1, :b => 1, :c => '1 foo', :d => false, :e => true, :f => nil, :g => {:a => 1, :b => 1, :c => '1 foo', :d => false, :e => true, :f => nil}, :h => [1, 1, '1 foo', false, true, nil]}) end end