Skip to content

Commit

Permalink
fix ruby 1.8 syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
josephholsten committed Sep 16, 2016
1 parent cb40c9a commit 9e75d02
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/unit/sensu_check_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
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

# 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
Expand All @@ -35,22 +35,22 @@
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

# 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
Expand Down

0 comments on commit 9e75d02

Please sign in to comment.