Sha256: f28241407040a08661ce91407498cb5c987d37cab5ff972ebfcc2786a2650229
Contents?: true
Size: 1.14 KB
Versions: 24
Compression:
Stored size: 1.14 KB
Contents
# encoding: utf-8 require 'spec_helper' describe Mutant::Runner::Mutation, '#killer' do let(:object) { described_class.run(config, mutation) } let(:config) do double( 'Config', fail_fast: fail_fast, reporter: reporter, strategy: strategy ) end let(:reporter) { double('Reporter') } let(:mutation) { double('Mutation', class: Mutant::Mutation) } let(:strategy) { double('Strategy') } let(:killer) { double('Killer', success?: success) } let(:fail_fast) { false } let(:success) { false } subject { object.killer } before do reporter.stub(report: reporter) strategy.stub(kill: killer) end it 'should call configuration to identify strategy' do config.should_receive(:strategy).with(no_args).and_return(strategy) should be(killer) end it 'should run killer' do strategy.should_receive(:kill).with(mutation).and_return(killer) should be(killer) end it { should be(killer) } it_should_behave_like 'an idempotent method' end
Version data entries
24 entries across 24 versions & 1 rubygems