lib/test/unit/testcase.rb in mini_specunit-0.1.0 vs lib/test/unit/testcase.rb in mini_specunit-0.1.1

- old
+ new

@@ -1,9 +1,22 @@ require 'minitest/spec' +require 'pp' module Test module Unit class TestCase < ::MiniTest::Spec + MINI_SPECUNIT = true + + + def mu_pp(obj) + obj.pretty_inspect.chomp + end + + def build_message(head, template=nil, *arguments) + template &&= template.chomp + template.gsub(/\?/) { mu_pp(arguments.shift) } + end + end end end