Add kwarg mutations
This commit is contained in:
parent
609ef40aa6
commit
2bcbfde35a
3 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,7 @@ module Mutant
|
|||
|
||||
# Mutator for required arguments
|
||||
class Argument < self
|
||||
handle(:arg)
|
||||
handle(:arg, :kwarg)
|
||||
|
||||
UNDERSCORE = '_'.freeze
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ module Mutant
|
|||
# your contribution is that close!
|
||||
handle(
|
||||
:ensure, :redo, :regopt, :retry, :arg_expr, :blockarg,
|
||||
:kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty,
|
||||
:kwrestarg, :kwoptarg, :undef, :module, :empty,
|
||||
:alias, :for, :xstr, :back_ref, :class, :restarg,
|
||||
:sclass, :match_with_lvasgn, :while_post,
|
||||
:until_post, :preexe, :postexe, :iflipflop, :eflipflop, :kwsplat,
|
||||
|
|
|
@ -4,4 +4,5 @@ Mutant::Meta::Example.add :kwarg do
|
|||
mutation 'def foo; end'
|
||||
mutation 'def foo(bar:); raise; end'
|
||||
mutation 'remove_method(:foo)'
|
||||
mutation 'def foo(_bar:); end'
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue