Add mutation from #reverse_merge to #merge

[fix #214]
This commit is contained in:
Markus Schirp 2014-08-11 15:11:00 +00:00
parent 2f8fb313ad
commit 8164de883e
3 changed files with 21 additions and 12 deletions

View file

@ -4,6 +4,7 @@
* Add -j, --jobs flag to control concurrency.
* Fix blind spots on send with block.
* Add mutation from `foo { bar }` to `bar`
* Add mutation from `reverse_merge` to `merge`
* Fix reporting of diff errors to include context [tjchambers]
# v0.5.26 2014-07-07

View file

@ -11,18 +11,19 @@ module Mutant
children :receiver, :selector
SELECTOR_REPLACEMENTS = IceNine.deep_freeze(
reverse_map: [:map, :each],
kind_of?: [:instance_of?],
is_a?: [:instance_of?],
reverse_each: [:each],
map: [:each],
send: [:public_send],
gsub: [:sub],
eql?: [:equal?],
to_s: [:to_str],
to_i: [:to_int],
to_a: [:to_ary],
:== => [:eql?, :equal?]
reverse_map: [:map, :each],
kind_of?: [:instance_of?],
is_a?: [:instance_of?],
reverse_each: [:each],
reverse_merge: [:merge],
map: [:each],
send: [:public_send],
gsub: [:sub],
eql?: [:equal?],
to_s: [:to_str],
to_i: [:to_int],
to_a: [:to_ary],
:== => [:eql?, :equal?]
)
private

View file

@ -7,6 +7,13 @@ Mutant::Meta::Example.add do
mutation 'each'
end
Mutant::Meta::Example.add do
source 'reverse_merge'
singleton_mutations
mutation 'merge'
end
Mutant::Meta::Example.add do
source 'reverse_map'