Sha256: 01c4a921af7b4c6981572e4b9f838b03d49589b4404296a5cc8e94d401db8cdd

Contents?: true

Size: 899 Bytes

Versions: 1

Compression:

Stored size: 899 Bytes

Contents

RSpec.describe Mutant::Reporter::CLI::Printer::SubjectProgress do
  setup_shared_context

  let(:reportable) { subject_a_result }

  describe '.call' do
    context 'on full coverage' do
      it_reports <<-'STR'
        subject-a mutations: 2
        ..
        (02/02) 100% - killtime: 2.00s runtime: 2.00s overhead: 0.00s
        - test-a
      STR
    end

    context 'on partial coverage' do
      update(:mutation_a_test_result) { { passed: true } }

      it_reports <<-'STR'
        subject-a mutations: 2
        F.
        (01/02)  50% - killtime: 2.00s runtime: 2.00s overhead: 0.00s
        - test-a
      STR
    end

    context 'without results' do
      update(:subject_a_result) { { mutation_results: [] } }

      it_reports <<-'STR'
        subject-a mutations: 2
        (00/02) 100% - killtime: 0.00s runtime: 0.00s overhead: 0.00s
        - test-a
      STR
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mutant-0.8.1 spec/unit/mutant/reporter/cli/printer/subject_progress_spec.rb