Add explicit mutator for dstr
This commit is contained in:
parent
6429bdc532
commit
1d567f65f1
4 changed files with 18 additions and 2 deletions
|
@ -64,6 +64,7 @@ require 'mutant/mutator/node/arguments'
|
|||
require 'mutant/mutator/node/begin'
|
||||
require 'mutant/mutator/node/connective/binary'
|
||||
require 'mutant/mutator/node/const'
|
||||
require 'mutant/mutator/node/dstr'
|
||||
require 'mutant/mutator/node/named_value/access'
|
||||
require 'mutant/mutator/node/named_value/constant_assignment'
|
||||
require 'mutant/mutator/node/named_value/variable_assignment'
|
||||
|
|
15
lib/mutant/mutator/node/dstr.rb
Normal file
15
lib/mutant/mutator/node/dstr.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# encoding: utf-8
|
||||
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
||||
# Dstr mutator
|
||||
class Dstr < Generic
|
||||
|
||||
handle(:dstr)
|
||||
|
||||
end # Dstr
|
||||
end # Node
|
||||
end # Mutator
|
||||
end # Mutant
|
|
@ -11,7 +11,7 @@ module Mutant
|
|||
# your contribution is that close!
|
||||
handle(
|
||||
:next, :break, :ensure,
|
||||
:dstr, :dsym, :yield, :rescue, :redo, :defined?,
|
||||
:dsym, :yield, :rescue, :redo, :defined?,
|
||||
:blockarg, :op_asgn, :and_asgn,
|
||||
:regopt, :restarg, :resbody, :retry, :arg_expr,
|
||||
:kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Mutant::Mutator::Node::Generic, 'dstr' do
|
||||
describe Mutant::Mutator::Node::Dstr, 'dstr' do
|
||||
before do
|
||||
Mutant::Random.stub(:hex_string => 'random')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue