Skip to content

Commit

Permalink
Fixed should to expect RSpec deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
jamtur01 committed Oct 14, 2014
1 parent f8a3f57 commit 163dbf3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/unit/puppet_x_sensu_totype_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 163dbf3

Please sign in to comment.