# File lib/facet/expect.rb, line 80 def ===(line) message = @message.dup # Iterate through each field to make sure it matches. When # we find a match, delete that field so we never check it # again. for field in fields do message.each_index do |index| if message[index] === field then message.delete_at(index) end end end # If there are no more fields, then we deleted all of them, # and we got a match return message.length == 0 end