mirror of
https://github.com/meineerde/rackstash.git
synced 2025-12-19 15:01:12 +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:
parent
5eeaab4afa
commit
ba3e0676e5
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user