From 9e75d0231bb74905f621e0e7fb830524d574b46b Mon Sep 17 00:00:00 2001 From: Joseph Anthony Pasquale Holsten Date: Fri, 16 Sep 2016 10:22:04 -0700 Subject: [PATCH] fix ruby 1.8 syntax errors --- spec/unit/sensu_check_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/unit/sensu_check_spec.rb b/spec/unit/sensu_check_spec.rb index 347c5fdadf..5b0b1333b2 100644 --- a/spec/unit/sensu_check_spec.rb +++ b/spec/unit/sensu_check_spec.rb @@ -3,22 +3,22 @@ describe Puppet::Type.type(:sensu_check) do let(:resource_hash) do { - title: 'foo.example.com', - catalog: Puppet::Resource::Catalog.new + :title => 'foo.example.com', + :catalog => Puppet::Resource::Catalog.new } end describe 'handlers' do it 'should support a string as a value' do expect( - described_class.new(resource_hash.merge(handlers: 'default'))[:handlers] + described_class.new(resource_hash.merge(:handlers => 'default'))[:handlers] ).to eq ['default'] end it 'should support an array as a value' do expect( described_class.new( - resource_hash.merge(handlers: %w(handler1 handler2)) + resource_hash.merge(:handlers => %w(handler1 handler2)) )[:handlers] ).to eq %w(handler1 handler2) end @@ -26,7 +26,7 @@ # it 'should support nil as a value' do # expect( # described_class.new( - # resource_hash.merge(handlers: nil) + # resource_hash.merge(:handlers => nil) # )[:handlers] # ).to eq nil # end @@ -35,14 +35,14 @@ describe 'subscribers' do it 'should support a string as a value' do expect( - described_class.new(resource_hash.merge(subscribers: 'default'))[:subscribers] + described_class.new(resource_hash.merge(:subscribers => 'default'))[:subscribers] ).to eq ['default'] end it 'should support an array as a value' do expect( described_class.new( - resource_hash.merge(subscribers: %w(subscriber1 subscriber2)) + resource_hash.merge(:subscribers => %w(subscriber1 subscriber2)) )[:subscribers] ).to eq %w(subscriber1 subscriber2) end @@ -50,7 +50,7 @@ # it 'should support nil as a value' do # expect( # described_class.new( - # resource_hash.merge(subscribers: nil) + # resource_hash.merge(:subscribers => nil) # )[:subscribers] # ).to eq nil # end