Class: AIRefactor::TestRunners::TestRunResult

Inherits:
Object
  • Object
show all
Defined in:
lib/ai_refactor/test_runners/test_run_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdout, stderr, status, example_count = 0, failure_count = 0, pending_count = 0, errored = 0) ⇒ TestRunResult

Returns a new instance of TestRunResult.



8
9
10
11
12
13
14
15
16
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 8

def initialize(stdout, stderr, status, example_count = 0, failure_count = 0, pending_count = 0, errored = 0)
  @stdout = stdout
  @stderr = stderr
  @status = status
  @example_count = example_count
  @failure_count = failure_count
  @pending_count = pending_count
  @errored = errored
end

Instance Attribute Details

#example_countObject (readonly)

Returns the value of attribute example_count.



6
7
8
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6

def example_count
  @example_count
end

#failure_countObject (readonly)

Returns the value of attribute failure_count.



6
7
8
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6

def failure_count
  @failure_count
end

#pending_countObject (readonly)

Returns the value of attribute pending_count.



6
7
8
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6

def pending_count
  @pending_count
end

#stderrObject (readonly)

Returns the value of attribute stderr.



6
7
8
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



6
7
8
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 6

def stdout
  @stdout
end

Instance Method Details

#exitstatusObject



23
24
25
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 23

def exitstatus
  @status.exitstatus
end

#failed?Boolean

Returns:

  • (Boolean)


18
19
20
21
# File 'lib/ai_refactor/test_runners/test_run_result.rb', line 18

def failed?
  return true unless @status.success?
  @errored && @errored.to_i > 0
end