lib/nanotest.rb in nanotest-0.9.1 vs lib/nanotest.rb in nanotest-0.9.2

- old
+ new

@@ -1,11 +1,11 @@ module NanoTest extend self FAILURES = [] - def assert(msg="assertion failed",file=nil,line=nil,&block) - if block.call == false + def assert(msg="assertion failed", file=nil, line=nil, &block) + unless block.call file ||= caller.first.split(':')[0] line ||= caller.first.split(':')[1] FAILURES << "(%s:%0.3d) %s" % [file,line,msg] print 'F' else