Skip to content

Commit

Permalink
add Multi#called
Browse files Browse the repository at this point in the history
  • Loading branch information
jbodah committed Aug 23, 2018
1 parent 2b28c3e commit bcf265a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/spy/multi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ def [](name)
@spies.find { |spy| spy.name == name }
end

def called
@spies.select { |spy| spy.call_count > 0 }
end

def uncalled
@spies.select { |spy| spy.call_count == 0 }
end
Expand Down

0 comments on commit bcf265a

Please sign in to comment.