| Path: | lib/facet/expect.rb |
| Last Update: | Mon Apr 11 00:05:34 EDT 2005 |
Given an IO object, read data from that object and expect certain data.
All expected data is expected in ‘chains’. When a message is received, it is compared to the pattern at the top of each chain. If it matches one of the patterns, then all is well, but an error message is printed otherwise.
A message can match patterns in more than one chain.
require 'carat/expect' # to do
Adopted from Ruby Treasures 0.4 Copyright (C) 2002 Paul Brannan <paul@atdesk.com>
You may distribute this software under the same terms as Ruby (see the file COPYING that was distributed with this library).
$Id: expect.rb, v0.4 2004/11/30 transami Exp $