Add explicit mutator for dstr

This commit is contained in:
Dan Kubb 2013-09-07 21:28:37 -07:00
parent 6429bdc532
commit 1d567f65f1
4 changed files with 18 additions and 2 deletions

View file

@ -64,6 +64,7 @@ require 'mutant/mutator/node/arguments'
require 'mutant/mutator/node/begin' require 'mutant/mutator/node/begin'
require 'mutant/mutator/node/connective/binary' require 'mutant/mutator/node/connective/binary'
require 'mutant/mutator/node/const' require 'mutant/mutator/node/const'
require 'mutant/mutator/node/dstr'
require 'mutant/mutator/node/named_value/access' require 'mutant/mutator/node/named_value/access'
require 'mutant/mutator/node/named_value/constant_assignment' require 'mutant/mutator/node/named_value/constant_assignment'
require 'mutant/mutator/node/named_value/variable_assignment' require 'mutant/mutator/node/named_value/variable_assignment'

View 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

View file

@ -11,7 +11,7 @@ module Mutant
# your contribution is that close! # your contribution is that close!
handle( handle(
:next, :break, :ensure, :next, :break, :ensure,
:dstr, :dsym, :yield, :rescue, :redo, :defined?, :dsym, :yield, :rescue, :redo, :defined?,
:blockarg, :op_asgn, :and_asgn, :blockarg, :op_asgn, :and_asgn,
:regopt, :restarg, :resbody, :retry, :arg_expr, :regopt, :restarg, :resbody, :retry, :arg_expr,
:kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty, :kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty,

View file

@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Mutant::Mutator::Node::Generic, 'dstr' do describe Mutant::Mutator::Node::Dstr, 'dstr' do
before do before do
Mutant::Random.stub(:hex_string => 'random') Mutant::Random.stub(:hex_string => 'random')
end end