Add mutation from send
to __send__
* `__send__` is the canonical form.
This commit is contained in:
parent
ae7284f39a
commit
a1c6018f30
2 changed files with 16 additions and 1 deletions
|
@ -17,7 +17,8 @@ module Mutant
|
|||
reverse_each: [:each],
|
||||
reverse_merge: [:merge],
|
||||
map: [:each],
|
||||
send: [:public_send],
|
||||
send: [:public_send, :__send__],
|
||||
__send__: [:public_send],
|
||||
gsub: [:sub],
|
||||
eql?: [:equal?],
|
||||
to_s: [:to_str],
|
||||
|
|
14
meta/send.rb
14
meta/send.rb
|
@ -189,12 +189,26 @@ Mutant::Meta::Example.add do
|
|||
mutation 'self.gsub(a, b)'
|
||||
end
|
||||
|
||||
Mutant::Meta::Example.add do
|
||||
source 'foo.__send__(bar)'
|
||||
|
||||
singleton_mutations
|
||||
mutation 'foo.__send__'
|
||||
mutation 'foo.public_send(bar)'
|
||||
mutation 'bar'
|
||||
mutation 'foo'
|
||||
mutation 'self.__send__(bar)'
|
||||
mutation 'foo.__send__(nil)'
|
||||
mutation 'foo.__send__(self)'
|
||||
end
|
||||
|
||||
Mutant::Meta::Example.add do
|
||||
source 'foo.send(bar)'
|
||||
|
||||
singleton_mutations
|
||||
mutation 'foo.send'
|
||||
mutation 'foo.public_send(bar)'
|
||||
mutation 'foo.__send__(bar)'
|
||||
mutation 'bar'
|
||||
mutation 'foo'
|
||||
mutation 'self.send(bar)'
|
||||
|
|
Loading…
Add table
Reference in a new issue