class L::Test::TargetTestCase

Public Class Methods

new(klass, t) click to toggle source
Calls superclass method L::Test::TargetTest::new
# File lib/rub/l/test.rb, line 211
def initialize(klass, t)
        @tag = t.to_sym
        @klass = klass
        
        klass.rub_target = self
        
        super()
end

Public Instance Methods

input() click to toggle source
# File lib/rub/l/test.rb, line 203
def input
        @klass.rub_get_dependancies
end
output() click to toggle source
# File lib/rub/l/test.rb, line 207
def output
        Set[@tag]
end
run_tests(reporter, options) click to toggle source
# File lib/rub/l/test.rb, line 220
def run_tests(reporter, options)
        out = StringIO.new("", "w")
        options = {
                io:      out,
                verbose: true
        }
        pr = Reporter.new(options)
        reporter << pr
        
        @klass.run reporter, options
        
        reporter.reporters.delete pr
        
        bs = R::BuildStep.new
        bs.desc = "Running test case :#{@tag}"
        bs.out  = out.string
        bs.status = pr.passed? ? 0 : 1
        bs.print
end