free_mutant/spec/unit/mutant/mutator/node/super_spec.rb
Markus Schirp a9974741f2 Use more modern spec file naming in spec/unit/mutator/node/*_spec.rb
* The old layout was imposed by older mutants that selected tests via
  file names.
* Reduce the useless namespace Mutator::Node::Connective
2013-12-29 23:04:28 +01:00

46 lines
889 B
Ruby

# encoding: utf-8
require 'spec_helper'
describe Mutant::Mutator, 'super' do
context 'with no arguments' do
let(:source) { 'super' }
let(:mutations) do
mutations = []
mutations << 'nil'
end
it_should_behave_like 'a mutator'
end
context 'with explicit empty arguments' do
let(:source) { 'super()' }
let(:mutations) do
mutations = []
mutations << 'super'
mutations << 'nil'
end
it_should_behave_like 'a mutator'
end
context 'super with arguments' do
let(:source) { 'super(foo, bar)' }
let(:mutations) do
mutations = []
mutations << 'super'
mutations << 'super()'
mutations << 'super(foo)'
mutations << 'super(bar)'
mutations << 'super(foo, nil)'
mutations << 'super(nil, bar)'
mutations << 'nil'
end
it_should_behave_like 'a mutator'
end
end