Class: Gimme::FindsStubbings

Inherits:
Object
  • Object
show all
Defined in:
lib/gimme/finds_stubbings.rb

Instance Method Summary collapse

Constructor Details

#initialize(stubbed_thing) ⇒ FindsStubbings

Returns a new instance of FindsStubbings.



3
4
5
# File 'lib/gimme/finds_stubbings.rb', line 3

def initialize(stubbed_thing)
  @stubbings = Gimme.stubbings.get(stubbed_thing) || {}
end

Instance Method Details

#count(method, args) ⇒ Object



7
8
9
# File 'lib/gimme/finds_stubbings.rb', line 7

def count(method, args)
  stubbings_for(method, args).size
end

#find(method, args) ⇒ Object



11
12
13
# File 'lib/gimme/finds_stubbings.rb', line 11

def find(method, args)
  stubbings_for(method, args).last
end