Sha256: e2c9b7a81faf49bf44ebde12e34ff36debbe77cb24219517638bf04267d830eb
Contents?: true
Size: 1.05 KB
Versions: 8
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' describe Mutant::Killer::Rspec, '.new' do subject { object.new(strategy, mutation) } let(:strategy) { double('Strategy', :spec_files => ['foo'], :error_stream => $stderr, :output_stream => $stdout) } let(:context) { double('Context') } let(:mutation) { double('Mutation', :subject => mutation_subject) } let(:mutation_subject) { double('Mutation Subject') } let(:object) { described_class } before do mutation.stub(:insert) mutation.stub(:reset) RSpec::Core::Runner.stub(:run => exit_status) end context 'when run exits zero' do let(:exit_status) { 0 } its(:killed?) { should be(false) } it { should be_a(described_class) } end context 'when run exits nonzero' do let(:exit_status) { 1 } its(:killed?) { should be(true) } it { should be_a(described_class) } end end
Version data entries
8 entries across 8 versions & 1 rubygems