Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Meaningful highlighting of failed tests for test/unit

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 textmate
Octocat-spinner-32 README.md
README.md

assert-equal-with-highlighting

Have you ever done something like this:

assert_equal foo.some.methods, bar.other.methods

only to see a huge pile of text with a tiny difference hidden somewhere deep inside?

assert-equal-with-highlighting solves such problems by, as the name says on the tin, highlighting differences between actual and expected value.

TextMate support

The library produces ANSI color codes which should work on any Terminal.

If you want to see properly highlighted results in TextMate test runner, copy escape.rb from textmate/ directory to whichever of these two locations old escape.rb is on your system:

  • /Library/Application Support/TextMate/Support/lib/escape.rb
  • /Applications/TextMate.app/Contents/SharedSupport/Support/lib/escape.rb

TODO

assert-equal-with-highlighting started as an old-style Rails plugin, it could really use turning it into a proper gem.

Since order of hashes is unpredictable in 1.8.x (and predictable, but not in useful way in 1.9), highlighting of hashes is pretty bad.

Something went wrong with that request. Please try again.