Raise on non-defined methods
This commit is contained in:
parent
925af7908b
commit
73e3f8fd66
|
@ -73,6 +73,10 @@ module Spectator::Mocks
|
|||
end
|
||||
end
|
||||
|
||||
macro method_missing(call)
|
||||
raise ::Spectator::Mocks::UnexpectedMessageError.new("#{self} received unexpected message {{call.name}}")
|
||||
end
|
||||
|
||||
def to_s(io)
|
||||
io << "Double("
|
||||
io << @spectator_double_name
|
||||
|
|
Loading…
Reference in New Issue