Module: TestBench::Run::Controls::Summary::File::Info

Defined in:
lib/test_bench/run/controls/summary/file/info.rb

Defined Under Namespace

Modules: NotFound, Other, Set

Class Method Summary collapse

Class Method Details

.aborted_eventsObject



40
41
42
43
44
45
# File 'lib/test_bench/run/controls/summary/file/info.rb', line 40

def self.aborted_events
  [
    Session::Events::Aborted.example,
    Session::Events::Aborted.other_example
  ]
end

.example(path: nil, tests: nil, failures: nil, skipped: nil, aborted_events: nil) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/test_bench/run/controls/summary/file/info.rb', line 7

def self.example(path: nil, tests: nil, failures: nil, skipped: nil, aborted_events: nil)
  path ||= self.path
  tests ||= self.tests
  failures ||= self.failures
  skipped ||= self.skipped
  aborted_events ||= self.aborted_events

  session_status = Status.example(
    tests:,
    failures:,
    skipped:,
    errors: aborted_events.count
  )

  TestBench::Run::Summary::FileInfo.new(path, session_status, aborted_events)
end

.failuresObject



32
33
34
# File 'lib/test_bench/run/controls/summary/file/info.rb', line 32

def self.failures
  11
end

.other_exampleObject



47
48
49
# File 'lib/test_bench/run/controls/summary/file/info.rb', line 47

def self.other_example
  Other.example
end

.pathObject



24
25
26
# File 'lib/test_bench/run/controls/summary/file/info.rb', line 24

def self.path
  Path::File.example
end

.skippedObject



36
37
38
# File 'lib/test_bench/run/controls/summary/file/info.rb', line 36

def self.skipped
  12
end

.testsObject



28
29
30
# File 'lib/test_bench/run/controls/summary/file/info.rb', line 28

def self.tests
  0
end