spec/unit/mutant/subject_spec.rb in mutant-0.8.10 vs spec/unit/mutant/subject_spec.rb in mutant-0.8.11
- old
+ new
@@ -69,14 +69,14 @@
describe '#mutations' do
subject { object.mutations }
before do
- expect(Mutant::Mutator).to receive(:each).with(node).and_yield(mutation_a).and_yield(mutation_b)
+ expect(Mutant::Mutator).to receive(:mutate).with(node).and_return([mutation_a, mutation_b])
end
- let(:mutation_a) { double('Mutation A') }
- let(:mutation_b) { double('Mutation B') }
+ let(:mutation_a) { instance_double(Parser::AST::Node, :mutation_a) }
+ let(:mutation_b) { instance_double(Parser::AST::Node, :mutation_b) }
it 'generates neutral and evil mutations' do
should eql([
Mutant::Mutation::Neutral.new(object, node),
Mutant::Mutation::Evil.new(object, mutation_a),