Class: Mutant::Result::TestEnv Private

Inherits:
Object
  • Object
show all
Includes:
Mutant::Result
Defined in:
lib/mutant/result.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

TestEnv result object

Instance Method Summary collapse

Methods included from Mutant::Result

included

Instance Method Details

#amount_test_resultsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



146
147
148
# File 'lib/mutant/result.rb', line 146

def amount_test_results
  test_results.length
end

#amount_testsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



142
143
144
# File 'lib/mutant/result.rb', line 142

def amount_tests
  env.integration.all_tests.length
end

#amount_tests_failedObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



150
151
152
# File 'lib/mutant/result.rb', line 150

def amount_tests_failed
  failed_test_results.length
end

#amount_tests_successObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



154
155
156
# File 'lib/mutant/result.rb', line 154

def amount_tests_success
  test_results.count(&:passed)
end

#failed_test_resultsArray<Result::Test>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Failed subject results

Returns:



129
130
131
# File 'lib/mutant/result.rb', line 129

def failed_test_results
  test_results.reject(&:success?)
end

#stop?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


134
135
136
# File 'lib/mutant/result.rb', line 134

def stop?
  env.config.fail_fast && !test_results.all?(&:success?)
end

#success?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if run is successful

Returns:

  • (Boolean)


121
122
123
# File 'lib/mutant/result.rb', line 121

def success?
  amount_tests_failed.equal?(0)
end

#testtimeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



138
139
140
# File 'lib/mutant/result.rb', line 138

def testtime
  test_results.map(&:runtime).sum(0.0)
end