1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

Test for invalid matchers for registered Adapters

Yes, this commit is required only because of my unhealthy urge to
achieve real 100% test coverage...
This commit is contained in:
Holger Just 2017-07-20 01:25:12 +02:00
parent 5eeaab4afa
commit ba3e0676e5

View File

@ -90,6 +90,16 @@ describe Rackstash::Adapters do
expect { described_class.register Class.new, :foo } expect { described_class.register Class.new, :foo }
.to raise_error(TypeError) .to raise_error(TypeError)
end end
it 'rejects invalid matchers' do
matcher = Object.new
matcher.instance_eval do
undef :===
end
expect { described_class.register(adapter, matcher) }
.to raise_error(TypeError)
end
end end
describe '#[]' do describe '#[]' do