From 5ee21dc3030b13c951f443d3d2270f9880c3ea04 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sun, 6 Jul 2014 13:50:54 +0000 Subject: [PATCH] Fix propagation of test report attributes from killforks I do not really like the current implementation. But it works for now. --- lib/mutant/runner.rb | 2 +- spec/unit/mutant/runner_spec.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/mutant/runner.rb b/lib/mutant/runner.rb index 4e108687..04974220 100644 --- a/lib/mutant/runner.rb +++ b/lib/mutant/runner.rb @@ -124,7 +124,7 @@ module Mutant config.isolation.call do mutation.insert test.run - end + end.update(test: test, mutation: mutation) rescue Isolation::Error Result::Test.new( test: test, diff --git a/spec/unit/mutant/runner_spec.rb b/spec/unit/mutant/runner_spec.rb index c0bbbca3..2f40d61d 100644 --- a/spec/unit/mutant/runner_spec.rb +++ b/spec/unit/mutant/runner_spec.rb @@ -14,6 +14,10 @@ describe Mutant::Runner do super end + def update(attributes) + self + end + def method_missing(name, *arguments) super unless attributes.key?(name) fail "Arguments provided for #{name}" if arguments.any?