class DohTest::CaptureOutput
Attributes
events[R]
Public Class Methods
new()
click to toggle source
# File lib/dohtest/capture_output.rb, line 6 def initialize @events = [] end
Public Instance Methods
assertion_failed(group_name, test_name, failure)
click to toggle source
# File lib/dohtest/capture_output.rb, line 38 def assertion_failed(group_name, test_name, failure) add(:group_name => group_name, :test_name => test_name, :failure => failure) end
assertion_passed(group_name, test_name)
click to toggle source
# File lib/dohtest/capture_output.rb, line 42 def assertion_passed(group_name, test_name) add(:group_name => group_name, :test_name => test_name) end
group_begin(group_name)
click to toggle source
# File lib/dohtest/capture_output.rb, line 18 def group_begin(group_name) add(:group_name => group_name) end
group_end(group_name, tests_ran, tests_skipped, assertions_passed, assertions_failed)
click to toggle source
# File lib/dohtest/capture_output.rb, line 22 def group_end(group_name, tests_ran, tests_skipped, assertions_passed, assertions_failed) add(:group_name => group_name, :tests_ran => tests_ran, :tests_skipped => tests_skipped, :assertions_passed => assertions_passed, :assertions_failed => assertions_failed) end
run_begin(config)
click to toggle source
# File lib/dohtest/capture_output.rb, line 10 def run_begin(config) add(:config => config) end
run_end(duration)
click to toggle source
# File lib/dohtest/capture_output.rb, line 14 def run_end(duration) add(:duration => duration) end
test_begin(group_name, test_name)
click to toggle source
# File lib/dohtest/capture_output.rb, line 26 def test_begin(group_name, test_name) add(:group_name => group_name, :test_name => test_name) end
test_end(group_name, test_name)
click to toggle source
# File lib/dohtest/capture_output.rb, line 30 def test_end(group_name, test_name) add(:group_name => group_name, :test_name => test_name) end
test_error(group_name, test_name, error, seed)
click to toggle source
# File lib/dohtest/capture_output.rb, line 34 def test_error(group_name, test_name, error, seed) add(:group_name => group_name, :test_name => test_name, :error => error, :seed => seed) end
Private Instance Methods
add(args)
click to toggle source
# File lib/dohtest/capture_output.rb, line 47 def add(args) args[:name] = caller.first.rpartition(':in ').last[1..-2] @events.push(args) end