Module: Tlb::RunData

Included in:
TestUnit::TestObserver::TestUnitRunData
Defined in:
lib/tlb/run_data.rb

Defined Under Namespace

Classes: Suite

Instance Method Summary collapse

Instance Method Details

#report_all_suite_dataObject



44
45
46
47
48
# File 'lib/tlb/run_data.rb', line 44

def report_all_suite_data
  suites.each do |suite_time|
    suite_time.report_to_tlb
  end
end

#suite_started(identity) ⇒ Object



25
26
27
28
29
# File 'lib/tlb/run_data.rb', line 25

def suite_started identity
  unless (suites.last && suites.last.for_id?(identity))
    suites << Tlb::RunData::Suite.new(identity, Time.now)
  end
end

#update_suite_data(identity) ⇒ Object



31
32
33
34
35
36
# File 'lib/tlb/run_data.rb', line 31

def update_suite_data identity
  if (suite = suites.last) #stupid framework :: retarded fix (this is necessary since rspec-1[don't know if rspec-2 is as stupid too] creates example_proxies for every example it runs, as though its an independent spec-group)
    suite.end_time = Time.now
    block_given? && yield(suite)
  end
end

#update_suite_failed(identity) ⇒ Object



38
39
40
41
42
# File 'lib/tlb/run_data.rb', line 38

def update_suite_failed identity
  update_suite_data(identity) do |suite|
    suite.failed = true
  end
end