Merge pull request #530 from mbj/feature/public_method-mutation

Add mutation from `#method` to `#public_method`
This commit is contained in:
Markus Schirp 2016-02-06 17:27:58 +00:00
commit b1854ef061
2 changed files with 12 additions and 0 deletions

View file

@ -20,6 +20,7 @@ module Mutant
map: %i[each], map: %i[each],
send: %i[public_send __send__], send: %i[public_send __send__],
__send__: %i[public_send], __send__: %i[public_send],
method: %i[public_method],
gsub: %i[sub], gsub: %i[sub],
eql?: %i[equal?], eql?: %i[equal?],
to_s: %i[to_str], to_s: %i[to_str],

View file

@ -40,6 +40,17 @@ Mutant::Meta::Example.add do
mutation 'self.const_get(bar)' mutation 'self.const_get(bar)'
end end
Mutant::Meta::Example.add do
source 'method(bar)'
singleton_mutations
mutation 'public_method(bar)'
mutation 'method'
mutation 'bar'
mutation 'method(nil)'
mutation 'method(self)'
end
Mutant::Meta::Example.add do Mutant::Meta::Example.add do
source 'a >= b' source 'a >= b'