Sha256: 7cdd9fea412d2eeaf6efb461a2e4b4802df134b171950ebc20a723cc8add2602
Contents?: true
Size: 774 Bytes
Versions: 1
Compression:
Stored size: 774 Bytes
Contents
module Rgot class T < Common def initialize(test_module, name, opts={}) super() @module = test_module @name = name @opts = opts end def run begin @module.extend @module @module.instance_method(@name).bind(@module).call(self) finished! rescue => e fail! report raise e end end def report duration = Rgot.now - @start template = "--- %s: %s (%.5fs)\n%s" if failed? printf template, "FAIL", @name, duration, @output elsif @opts[:verbose] if skipped? printf template, "SKIP", @name, duration, @output else printf template, "PASS", @name, duration, @output end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rgot-0.0.1 | lib/rgot/t.rb |