From e7debcb8014ce3316f8894be2355eccc7008d20f Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sun, 28 Jul 2013 19:28:08 +0200 Subject: [PATCH] Fix style issues in Killer::Rspec --- lib/mutant/killer/rspec.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/mutant/killer/rspec.rb b/lib/mutant/killer/rspec.rb index c05fb454..2cdb4199 100644 --- a/lib/mutant/killer/rspec.rb +++ b/lib/mutant/killer/rspec.rb @@ -18,11 +18,13 @@ module Mutant def run mutation.insert # TODO: replace with real streams from configuration - # Note: we assume the only interesting output from a failed rspec run is stderr. require 'stringio' + # Note: We assume interesting output from a failed rspec run is stderr. rspec_err = StringIO.new - killed = !::RSpec::Core::Runner.run(command_line_arguments, nil, rspec_err).zero? + exit_code = ::RSpec::Core::Runner.run(cli_arguments, nil, rspec_err) + + killed = !exit_code.zero? if killed and mutation.should_survive? rspec_err.rewind @@ -41,7 +43,7 @@ module Mutant # # @api private # - def command_line_arguments + def cli_arguments %W( --fail-fast ) + strategy.spec_files(mutation.subject)