Created
April 14, 2011 03:16
-
-
Save tenderlove/918839 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "minitest/autorun" | |
class ZOMGIO < Struct.new(:io) | |
def puts str = nil | |
return io.puts str unless str =~ /\[([\/\w.]+):(\d+)\]:\n/ | |
io.print $` | |
io.print $& | |
io.puts "> #{File.readlines($1)[$2.to_i - 1].strip}" | |
io.puts $' | |
end | |
def method_missing msg, *args | |
io.send(msg, *args) | |
end | |
end | |
MiniTest::Unit.output = ZOMGIO.new(MiniTest::Unit.output) | |
class TestFuntimes < MiniTest::Unit::TestCase | |
def test_pass | |
assert_equal 1, 1 | |
end | |
def test_sanity | |
assert_equal 10, 11 | |
end | |
def test_cannot_be_blank | |
assert_equal ["can't be blank"], [] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment