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:
parent
5eeaab4afa
commit
ba3e0676e5
@ -90,6 +90,16 @@ describe Rackstash::Adapters do
|
||||
expect { described_class.register Class.new, :foo }
|
||||
.to raise_error(TypeError)
|
||||
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
|
||||
|
||||
describe '#[]' do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user