lib/qp.rb in cutep-0.0.1 vs lib/qp.rb in cutep-0.0.2

- old
+ new

@@ -1,27 +1,22 @@ # Copyright (C) 2003-2007 Kouichirou Eto, All rights reserved. # License: Ruby License -module QP #:nodoc: - module VERSION #:nodoc: - MAJOR = 0 - MINOR = 0 - TINY = 1 - STRING = [MAJOR, MINOR, TINY].join('.') - end +require 'qp/version' - def caller_msg(ca) +module QP #:nodoc: + def caller_msg(ca) #:nodoc: file, linenum, msg = ca.first.split(/:([0-9]+):/) msg = $1 if /\Ain \`(.+)\'\z/ =~ msg File.basename(file)+':'+linenum.to_s+':'+msg.to_s end - def ar_inspect(ar) + def ar_inspect(ar) #:nodoc: '['+ar.map {|arg| arg.inspect }.join(', ')+']' end - def runtime + def runtime #:nodoc: $__qp_t__ = Time.now unless defined? $__qp_t__ sprintf('%.1f', Time.now - $__qp_t__) end def qp(ca, *args) @@ -47,10 +42,9 @@ $LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..' $__test_qp__ = true end if defined?($__test_qp__) && $__test_qp__ - #require 'qwik/testunit' require 'test/unit' require 'test/unit/ui/console/testrunner' class TestQP < Test::Unit::TestCase def test_all