Rename shared mutation examples

This commit is contained in:
Markus Schirp 2012-08-01 14:58:24 +02:00
parent 640ce5360e
commit 414c572d03
15 changed files with 24 additions and 24 deletions

View file

@ -1,4 +1,4 @@
shared_examples_for 'a mutation enumerator method' do
shared_examples_for 'a mutator' do
subject { object.each(node) { |item| yields << item } }
let(:yields) { [] }
@ -34,8 +34,8 @@ shared_examples_for 'a mutation enumerator method' do
end
end
shared_examples_for 'a noop mutation enumerator method' do
shared_examples_for 'a noop mutator' do
let(:mutations) { [] }
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -16,5 +16,5 @@ describe Mutant::Mutator, 'block' do
mutations << [:block, 'self.bar'.to_sexp]
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -7,7 +7,7 @@ describe Mutant::Mutator, 'call' do
context 'implicit' do
let(:source) { 'foo' }
it_should_behave_like 'a noop mutation enumerator method'
it_should_behave_like 'a noop mutator'
end
context 'explict' do
@ -19,14 +19,14 @@ describe Mutant::Mutator, 'call' do
mutations << 'foo'
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end
end
context 'to some object' do
let(:source) { '1.foo' }
it_should_behave_like 'a noop mutation enumerator method'
it_should_behave_like 'a noop mutator'
end
end
@ -35,7 +35,7 @@ describe Mutant::Mutator, 'call' do
context 'implicit' do
let(:source) { 'foo(1)' }
it_should_behave_like 'a noop mutation enumerator method'
it_should_behave_like 'a noop mutator'
end
context 'explicit' do
@ -47,7 +47,7 @@ describe Mutant::Mutator, 'call' do
mutations << 'foo(1)'
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end
end
end

View file

@ -19,6 +19,6 @@ describe Mutant::Mutator, '.each' do
Mutant::Random.stub(:hex_string => random_string)
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end
end

View file

@ -26,5 +26,5 @@ describe Mutant::Mutator::Literal, 'array' do
mutations << '[true, false, nil]'
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -8,7 +8,7 @@ describe Mutant::Mutator::Literal, 'boolean' do
%w(nil false)
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end
context 'false literal' do
@ -18,6 +18,6 @@ describe Mutant::Mutator::Literal, 'boolean' do
%w(nil true)
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end
end

View file

@ -13,5 +13,5 @@ describe Mutant::Mutator::Literal, 'empty array' do
mutations << '[nil]'
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -13,5 +13,5 @@ describe Mutant::Mutator::Literal, 'fixnum' do
Mutant::Random.stub(:fixnum => random_fixnum)
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -21,5 +21,5 @@ describe Mutant::Mutator::Literal, 'float' do
Mutant::Random.stub(:float => random_float)
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -30,5 +30,5 @@ describe Mutant::Mutator::Literal, 'hash' do
mutations << [:hash, [:true ], [:true ], [:false], [:false ], [:nil], [:nil] ]
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -14,7 +14,7 @@ describe Mutant::Mutator::Literal, 'range' do
mutations << '1..(0.0/0.0)'
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end
context 'exclusive range literal' do
@ -30,6 +30,6 @@ describe Mutant::Mutator::Literal, 'range' do
mutations << '1...(0.0/0.0)'
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end
end

View file

@ -17,7 +17,7 @@ describe Mutant::Mutator::Literal, 'regex' do
let(:mutations) { base_mutations }
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
context 'when source is empty regexp' do
before do
@ -28,6 +28,6 @@ describe Mutant::Mutator::Literal, 'regex' do
let(:mutations) { base_mutations - [source.to_ast] }
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end
end

View file

@ -13,5 +13,5 @@ describe Mutant::Mutator::Literal, 'string' do
Mutant::Random.stub(:hex_string => random_string)
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -13,5 +13,5 @@ describe Mutant::Mutator::Literal, 'symbol' do
Mutant::Random.stub(:hex_string => random_string)
end
it_should_behave_like 'a mutation enumerator method'
it_should_behave_like 'a mutator'
end

View file

@ -3,5 +3,5 @@ require 'spec_helper'
describe Mutant::Mutator, 'self' do
let(:source) { 'self' }
it_should_behave_like 'a noop mutation enumerator method'
it_should_behave_like 'a noop mutator'
end