Class: Mocktail::GathersCallsOfMethod

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/mocktail/verifies_call/raises_verification_error/gathers_calls_of_method.rb,
lib/mocktail/sorbet/mocktail/verifies_call/raises_verification_error/gathers_calls_of_method.rb

Instance Method Summary collapse

Instance Method Details

#gather(dry_call) ⇒ Object



5
6
7
8
9
10
# File 'lib/mocktail/verifies_call/raises_verification_error/gathers_calls_of_method.rb', line 5

def gather(dry_call)
  Mocktail.cabinet.calls.select { |call|
    call.double == dry_call.double &&
      call.method == dry_call.method
  }
end