Class: DohTest::CaptureOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/dohtest/capture_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCaptureOutput

Returns a new instance of CaptureOutput.



6
7
8
# File 'lib/dohtest/capture_output.rb', line 6

def initialize
  @events = []
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



4
5
6
# File 'lib/dohtest/capture_output.rb', line 4

def events
  @events
end

Instance Method Details

#assertion_failed(group_name, test_name, failure) ⇒ Object



38
39
40
# 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) ⇒ Object



42
43
44
# 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) ⇒ Object



18
19
20
# 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) ⇒ Object



22
23
24
# 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) ⇒ Object



10
11
12
# File 'lib/dohtest/capture_output.rb', line 10

def run_begin(config)
  add(:config => config)
end

#run_end(duration) ⇒ Object



14
15
16
# File 'lib/dohtest/capture_output.rb', line 14

def run_end(duration)
  add(:duration => duration)
end

#test_begin(group_name, test_name) ⇒ Object



26
27
28
# 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) ⇒ Object



30
31
32
# 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) ⇒ Object



34
35
36
# 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