Remove literal array mutation that adds an element
It turns out this mutation is not "universal". Meaning not in all scenarios this extra element triggers an edge case the specs have to cover.
This commit is contained in:
parent
50908773b1
commit
30884c22a2
4 changed files with 1 additions and 22 deletions
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
threshold: 16
|
||||
total_score: 684
|
||||
total_score: 680
|
||||
|
|
|
@ -34,7 +34,6 @@ module Mutant
|
|||
emit_self(*dup_children)
|
||||
mutate_child(index)
|
||||
end
|
||||
emit_self(s(:nil), *children)
|
||||
end
|
||||
|
||||
end # Array
|
||||
|
|
|
@ -21,9 +21,6 @@ describe Mutant::Mutator::Node::Literal, 'array' do
|
|||
|
||||
# Empty array
|
||||
mutations << '[]'
|
||||
|
||||
# Extra element
|
||||
mutations << '[nil, true, false]'
|
||||
end
|
||||
|
||||
it_should_behave_like 'a mutator'
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Mutant::Mutator::Node::Literal, 'empty array' do
|
||||
let(:source) { '[]' }
|
||||
|
||||
let(:mutations) do
|
||||
mutations = []
|
||||
|
||||
# Literal replaced with nil
|
||||
mutations << 'nil'
|
||||
|
||||
# Extra element
|
||||
mutations << '[nil]'
|
||||
end
|
||||
|
||||
it_should_behave_like 'a mutator'
|
||||
end
|
Loading…
Reference in a new issue