From 59f952d56f9e7fa214d0c9f3fb2d3b9c29355d08 Mon Sep 17 00:00:00 2001 From: Dan Kubb Date: Sun, 21 Jul 2013 23:14:57 -0700 Subject: [PATCH] Remove rescue from rspec killer * Based on recent discussions in #68 we think rescuing all exceptions like this was probably a mistake. If this continues to be a problem we will need to narrow things down to a reproducible issue we can report to the RSpec team. One possible work-around might be to catch exceptions that occur within the specs themselves, and to bubble up everything else. However, this does bring up the question of why the specs failed; if it was due to a syntax error caused by mutant and unparser, then that's probably a bug we need to fix. It could be for some other reason, which we would have to isolate and handle explicitly, but I think we are all in agreement that this logic is too broad. --- lib/mutant/killer/rspec.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/mutant/killer/rspec.rb b/lib/mutant/killer/rspec.rb index 4935dea5..32b04f8c 100644 --- a/lib/mutant/killer/rspec.rb +++ b/lib/mutant/killer/rspec.rb @@ -20,12 +20,7 @@ module Mutant # TODO: replace with real streams from configuration require 'stringio' null = StringIO.new - argv = command_line_arguments - begin - !::RSpec::Core::Runner.run(argv, null, null).zero? - rescue StandardError - true - end + !::RSpec::Core::Runner.run(command_line_arguments, null, null).zero? end # Return command line arguments