Do not mutate super to super and prep release

This commit is contained in:
Markus Schirp 2013-01-10 21:09:37 +01:00
parent 47db99b613
commit a0dd3c9a59
5 changed files with 9 additions and 24 deletions

View file

@ -1,3 +1,9 @@
# v0.2.15 2013-01-10
* [change] Do not mutate super to super() anymore. This needs a context check in future.
[Compare v0.2.14..v0.2.15](https://github.com/mbj/mutant/compare/v0.2.14...v0.2.15)
# v0.2.14 2013-01-09 # v0.2.14 2013-01-09
* [change] Do not emit mutation to { nil => nil } for hash literals * [change] Do not emit mutation to { nil => nil } for hash literals

View file

@ -8,6 +8,7 @@ module Mutant
handle(Rubinius::AST::Self) handle(Rubinius::AST::Self)
# Currently unhandled node classes. Feel free to contribute your mutator! # Currently unhandled node classes. Feel free to contribute your mutator!
handle(Rubinius::AST::ZSuper)
handle(Rubinius::AST::ElementAssignment) handle(Rubinius::AST::ElementAssignment)
handle(Rubinius::AST::AttributeAssignment) handle(Rubinius::AST::AttributeAssignment)
handle(Rubinius::AST::Not) handle(Rubinius::AST::Not)

View file

@ -2,23 +2,6 @@ module Mutant
class Mutator class Mutator
class Node class Node
# Mutator for super without parantheses
class ZSuper < self
handle(Rubinius::AST::ZSuper)
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
emit_node(Rubinius::AST::Super, new(Rubinius::AST::ActualArguments))
end
end
# Mutator for super with parantheses # Mutator for super with parantheses
class Super < self class Super < self
handle(Rubinius::AST::Super) handle(Rubinius::AST::Super)

View file

@ -2,7 +2,7 @@
Gem::Specification.new do |gem| Gem::Specification.new do |gem|
gem.name = 'mutant' gem.name = 'mutant'
gem.version = '0.2.14' gem.version = '0.2.15'
gem.authors = [ 'Markus Schirp' ] gem.authors = [ 'Markus Schirp' ]
gem.email = [ 'mbj@seonic.net' ] gem.email = [ 'mbj@seonic.net' ]
gem.description = 'Mutation testing for ruby' gem.description = 'Mutation testing for ruby'

View file

@ -5,12 +5,7 @@ describe Mutant::Mutator, 'super' do
context 'with no arguments' do context 'with no arguments' do
let(:source) { 'super' } let(:source) { 'super' }
let(:mutations) do it_should_behave_like 'a noop mutator'
mutations = []
mutations << 'super()'
end
it_should_behave_like 'a mutator'
end end
context 'with explicit empty arguments' do context 'with explicit empty arguments' do