Skip to content

Commit

Permalink
Remove literal array mutation that adds an element
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mbj committed Jul 8, 2013
1 parent 5090877 commit 30884c2
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion config/flay.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
threshold: 16
total_score: 684
total_score: 680
1 change: 0 additions & 1 deletion lib/mutant/mutator/node/literal/array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def mutate_body
emit_self(*dup_children)
mutate_child(index)
end
emit_self(s(:nil), *children)
end

end # Array
Expand Down
3 changes: 0 additions & 3 deletions spec/unit/mutant/mutator/node/literal/array_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@

# Empty array
mutations << '[]'

# Extra element
mutations << '[nil, true, false]'
end

it_should_behave_like 'a mutator'
Expand Down
17 changes: 0 additions & 17 deletions spec/unit/mutant/mutator/node/literal/empty_array_spec.rb

This file was deleted.

0 comments on commit 30884c2

Please sign in to comment.