Sha256: e4b6dcab779dccea09a84921097d381155db81e3fbd1a1996df3455dd0e56b9c
Contents?: true
Size: 1.14 KB
Versions: 12
Compression:
Stored size: 1.14 KB
Contents
require 'spec_helper' describe Mutant::Runner::Subject, '#success?' do subject { object.success? } let(:object) { described_class.run(config, mutation_subject) } let(:reporter) { mock('Reporter') } let(:mutation_subject) { mock('Subject', :map => mutations) } let(:config) { mock('Config', :reporter => reporter) } let(:mutation_a) { mock('Mutation A', :failed? => false) } let(:mutation_b) { mock('Mutation B', :failed? => false) } let(:mutations) { [mutation_a, mutation_b] } before do reporter.stub(:report => reporter) end class DummyMutationRunner include Concord::Public.new(:config, :mutation) def self.run(*args) new(*args) end def failed? @mutation.failed? end end before do stub_const('Mutant::Runner::Mutation', DummyMutationRunner) end context 'without evil failed mutations' do it { should be(true) } end context 'with failing noop mutation' do end context 'with failing evil mutations' do before do mutation_a.stub(:failed? => true) end it { should be(false) } end end
Version data entries
12 entries across 12 versions & 1 rubygems