# File lib/facet/expect.rb, line 167 def handle_line(line) line.chomp!() # Check each element in the ignore chain for pattern in @ignore_chain do return if pattern === line end # Check the first element of each expect chain to see if # the message matches match = false for key, chain in @expect_chain do next if chain.length == 0 if chain.first() === line then chain.shift() @expects_left -= 1 match = true end end throw :expect_loop_done if @expects_left == 0 raise UnmatchedMessage.new(line) if match == false end