Sha256: 69c77106bae4547ae5836483cdce7fae39e419c44aa7057a92976ff15bfa6b66
Contents?: true
Size: 805 Bytes
Versions: 1
Compression:
Stored size: 805 Bytes
Contents
module Rgot class T < Common def initialize(test_module, name, opts={}) super() @module = test_module @name = name @opts = opts @module.extend @module end def run begin call 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 def call @module.instance_method(@name).bind(@module).call(self) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rgot-0.0.2 | lib/rgot/t.rb |