Make sure mutation is inserted after fork
This commit is contained in:
parent
80f0960672
commit
3fc07deaff
3 changed files with 2 additions and 39 deletions
|
@ -115,7 +115,6 @@ module Mutant
|
||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def run_with_benchmark
|
def run_with_benchmark
|
||||||
mutation.insert
|
|
||||||
start_time = Time.now
|
start_time = Time.now
|
||||||
@killed = run
|
@killed = run
|
||||||
end_time = Time.now
|
end_time = Time.now
|
||||||
|
|
|
@ -28,21 +28,11 @@ module Mutant
|
||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def run
|
def run
|
||||||
!run_rspec.zero?
|
mutation.insert
|
||||||
|
!::RSpec::Core::Runner.run(command_line_arguments, @error_stream, @output_stream).zero?
|
||||||
end
|
end
|
||||||
memoize :run
|
memoize :run
|
||||||
|
|
||||||
# Run rspec with some wired compat stuff
|
|
||||||
#
|
|
||||||
# @return [Fixnum]
|
|
||||||
# returns the exit status from rspec runner
|
|
||||||
#
|
|
||||||
# @api private
|
|
||||||
#
|
|
||||||
def run_rspec
|
|
||||||
::RSpec::Core::Runner.run(command_line_arguments, @error_stream, @output_stream)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Return command line arguments
|
# Return command line arguments
|
||||||
#
|
#
|
||||||
# @return [Array]
|
# @return [Array]
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe Mutant::Killer,'.new' do
|
|
||||||
subject { class_under_test.new(strategy,mutation) }
|
|
||||||
|
|
||||||
let(:strategy) { mock('Strategy') }
|
|
||||||
|
|
||||||
let(:mutation) { mock('Mutation') }
|
|
||||||
|
|
||||||
let(:class_under_test) do
|
|
||||||
Class.new(described_class) do
|
|
||||||
define_method(:run) { false }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
before do
|
|
||||||
mutation.stub(:insert)
|
|
||||||
end
|
|
||||||
|
|
||||||
it { should be_kind_of(class_under_test) }
|
|
||||||
|
|
||||||
it 'should insert mutation' do
|
|
||||||
mutation.should_receive(:insert)
|
|
||||||
subject
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Add table
Add a link
Reference in a new issue