Class: Mutant::Result::Subject

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

Overview

Subject result

Instance Method Summary collapse

Methods included from Coverage

#coverage, included

Methods included from Mutant::Result

included, #overhead

Instance Method Details

#alive_mutation_resultsArray<Result::Mutation>

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.

Return killed mutations

Returns:


181
182
183
# File 'lib/mutant/result.rb', line 181

def alive_mutation_results
  mutation_results.reject(&:success?)
end

#amount_mutation_resultsFixnum

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.

Return amount of mutations

Returns:

  • (Fixnum)

192
193
194
# File 'lib/mutant/result.rb', line 192

def amount_mutation_results
  mutation_results.length
end

#amount_mutationsFixnum

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.

Return amount of mutations

Returns:

  • (Fixnum)

202
203
204
# File 'lib/mutant/result.rb', line 202

def amount_mutations
  subject.mutations.length
end

#amount_mutations_aliveFixnum

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.

Return number of alive mutations

Returns:

  • (Fixnum)

222
223
224
# File 'lib/mutant/result.rb', line 222

def amount_mutations_alive
  alive_mutation_results.length
end

#amount_mutations_killedFixnum

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.

Return number of killed mutations

Returns:

  • (Fixnum)

212
213
214
# File 'lib/mutant/result.rb', line 212

def amount_mutations_killed
  killed_mutation_results.length
end

#continue?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 runner should continue on subject

Returns:

  • (Boolean)

171
172
173
# File 'lib/mutant/result.rb', line 171

def continue?
  mutation_results.all?(&:success?)
end

#killed_mutation_resultsArray<Result::Mutation>

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.

Return alive mutations

Returns:


232
233
234
# File 'lib/mutant/result.rb', line 232

def killed_mutation_results
  mutation_results.select(&: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 subject was processed successful

Returns:

  • (Boolean)

161
162
163
# File 'lib/mutant/result.rb', line 161

def success?
  alive_mutation_results.empty?
end