elabs/elabs_matchers — pull request #2 by Wizek (2012-08-25 11:12:14+00:00)
Title: Numerous improvements

* defined `matcher` method to dry up `match` and `match_for_should_not`
** `table.all("thead th")` => `table.all("th")`
We should allow this too, shouldn't we?
** `th.text.include?(header)` => `th.text.include?(header.to_s)`
is more robust
** `XPath.child(:td, :th)` => `XPath.descendant(:td)`
this caused some troubles, I belive?
** `XPath.contains(value)` => `XPath.contains(value.to_s)`
is more robust
** `inject { |agg, exp| agg & exp }` => `reduce(:&)`
The same, but more succint.

* defined `ascii_table` method to unify `failure_message`s:
now both types of failures show tables
** Improved rendering: columns will have variable width
instead of fixed at 21 characters
** Improved rendering: headers are more visible.

* When row is defined as an array
we no longer assert cell position inside the table
only that they are in the same row