Class: Bogus::EnsuresAllInteractionsSatisfied

Inherits:
Object
  • Object
show all
Defined in:
lib/bogus/stubbing/ensures_all_interactions_satisfied.rb

Instance Method Summary collapse

Instance Method Details

#ensure_satisfied!(objects) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/bogus/stubbing/ensures_all_interactions_satisfied.rb', line 3

def ensure_satisfied!(objects)
  unsatisfied = unsatisfied_interactions(objects)
  return if unsatisfied.empty?

  calls = all_calls(objects)
  raise NotAllExpectationsSatisfied.create(unsatisfied, calls)
end