lib/mutest/result.rb in mutest-0.0.9 vs lib/mutest/result.rb in mutest-0.0.10

- old
+ new

@@ -14,11 +14,11 @@ FULL_COVERAGE else Rational(amount_mutations_killed, amount_mutation_results) end end - end # Coverage + end # Class level mixin module ClassMethods # Generate a sum method from name and collection # @@ -33,11 +33,11 @@ define_method(name) do public_send(collection).map(&name).reduce(0, :+) end memoize(name) end - end # ClassMethods + end private_constant(*constants(false)) # Mutest overhead running mutatet tests # @@ -62,15 +62,17 @@ end end # Env result object class Env - include Coverage, Result, Anima.new( + include Anima.new( :env, :runtime, :subject_results ) + include Result + include Coverage # Test if run is successful # # @return [Boolean] def success? @@ -101,29 +103,32 @@ # # @return [Integer] def amount_subjects env.subjects.length end - end # Env + end # Test result class Test - include Result, Anima.new( + include Anima.new( :output, :passed, :runtime, :tests ) - end # Test + include Result + end # Subject result class Subject - include Coverage, Result, Anima.new( + include Anima.new( :mutation_results, :subject, :tests ) + include Result + include Coverage sum :killtime, :mutation_results sum :runtime, :mutation_results # Test if subject was processed successful @@ -176,18 +181,19 @@ # @return [Array<Result::Mutation>] def killed_mutation_results mutation_results.select(&:success?) end memoize :killed_mutation_results - end # Subject + end # Mutation result class Mutation - include Result, Anima.new( + include Anima.new( :mutation, :test_result ) + include Result # The runtime # # @return [Float] def runtime @@ -205,8 +211,8 @@ # # @return [Boolean] def success? mutation.class.success?(test_result) end - end # Mutation - end # Result -end # Mutest + end + end +end