Sha256: 3ebb6d8dd3a977afbccb0098d7dbf85e89e3a2bd727bc62aa20b7f78c2528bbc

Contents?: true

Size: 1.02 KB

Versions: 14

Compression:

Stored size: 1.02 KB

Contents

RSpec.describe Mutant::Result::Subject do
  let(:object) do
    described_class.new(
      subject:          mutation_subject,
      mutation_results: mutation_results,
      tests:            []
    )
  end

  let(:mutation_subject) { double('Subject') }

  describe '#continue?' do
    subject { object.continue? }

    context 'when mutation results are empty' do
      let(:mutation_results) { [] }

      it { should be(true) }
    end

    context 'with failing mutation result' do
      let(:mutation_results) { [double('Mutation Result', success?: false)] }

      it { should be(false) }
    end

    context 'with successful mutation result' do
      let(:mutation_results) { [double('Mutation Result', success?: true)] }

      it { should be(true) }
    end

    context 'with failed and successful mutation result' do
      let(:mutation_results) do
        [
          double('Mutation Result', success?: true),
          double('Mutation Result', success?: false)
        ]
      end

      it { should be(false) }
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mutant-0.8.8 spec/unit/mutant/result/subject_spec.rb
mutant-0.8.7 spec/unit/mutant/result/subject_spec.rb
mutant-0.8.6 spec/unit/mutant/result/subject_spec.rb
mutant-0.8.5 spec/unit/mutant/result/subject_spec.rb
mutant-0.8.4 spec/unit/mutant/result/subject_spec.rb
mutant-0.8.3 spec/unit/mutant/result/subject_spec.rb
mutant-0.8.2 spec/unit/mutant/result/subject_spec.rb
mutant-0.8.1 spec/unit/mutant/result/subject_spec.rb
mutant-0.8.0 spec/unit/mutant/result/subject_spec.rb
mutant-0.7.9 spec/unit/mutant/result/subject_spec.rb
mutant-0.7.8 spec/unit/mutant/result/subject_spec.rb
mutant-0.7.7 spec/unit/mutant/result/subject_spec.rb
mutant-0.7.6 spec/unit/mutant/result/subject_spec.rb
mutant-0.7.5 spec/unit/mutant/result/subject_spec.rb