Class: Contr::Matcher::Sync

Inherits:
Base
  • Object
show all
Defined in:
lib/contr/matcher/sync.rb

Instance Method Summary collapse

Constructor Details

#initializeSync

Returns a new instance of Sync.



6
7
8
9
10
11
12
# File 'lib/contr/matcher/sync.rb', line 6

def initialize(*)
  super

  @async = false
  @ok_rules = []
  @failed_rules = []
end

Instance Method Details

#matchObject



14
15
16
17
# File 'lib/contr/matcher/sync.rb', line 14

def match
  any_failed?(guarantees)   && dump_state_and_raise(GuaranteesNotMatched)
  all_failed?(expectations) && dump_state_and_raise(ExpectationsNotMatched)
end