Sha256: 4cbd02ebc07489bfc4b1b5dc144b0f2e6d5efc43b8a3aa1622ee8c8f720f9395

Contents?: true

Size: 548 Bytes

Versions: 2

Compression:

Stored size: 548 Bytes

Contents

# coding: utf-8

require 'thinreports'

class ThinReports::TestCaseRunner
  ROOTDIR = File.expand_path(File.join('test', 'case'))
  
  class << self
    attr_accessor :current
    
    def current(casename)
      @current = casename.to_s
    end
    
    def layout_file
      case_resource("#{@current}.tlf")
    end
    
    def output_file
      case_resource("#{@current}.pdf")
    end
    
    def case_resource(filename = nil)
      File.join(*[ROOTDIR, @current, filename].compact)
    end
  end
end

CaseRunner = ThinReports::TestCaseRunner

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thinreports-0.7.6 test/case/helper.rb
thinreports-0.7.5 test/case/helper.rb