<commit_before># encoding: utf-8

require 'spec_helper'

describe Mutant::Runner::Config, '#subjects' do
  let(:object) { described_class.run(config) }

  subject { object.subjects }

  let(:config) do
    double(
      'Config',
      class:    Mutant::Config,
      subjects: [subject_a, subject_b],
      strategy: strategy,
      reporter: reporter
    )
  end

  let(:reporter)  { double('Reporter')                }
  let(:strategy)  { double('Strategy')                }
  let(:subject_a) { double('Subject A')               }
  let(:subject_b) { double('Subject B')               }
  let(:runner_a)  { double('Runner A', stop?: stop_a) }
  let(:runner_b)  { double('Runner B', stop?: stop_b) }

  before do
    strategy.stub(:setup)
    strategy.stub(:teardown)
    reporter.stub(report: reporter)
    Mutant::Runner.stub(:run).with(config, subject_a).and_return(runner_a)
    Mutant::Runner.stub(:run).with(config, subject_b).and_return(runner_b)
  end

  context 'without earily stop' do
    let(:stop_a) { false }
    let(:stop_b) { false }

    it { should eql([runner_a, runner_b]) }

    it_should_behave_like 'an idempotent method'
  end

  context 'with earily stop' do
    let(:stop_a) { true  }
    let(:stop_b) { false }

    it { should eql([runner_a]) }

    it_should_behave_like 'an idempotent method'
  end
end
<commit_msg>Typo in context<commit_after># encoding: utf-8

require 'spec_helper'

describe Mutant::Runner::Config, '#subjects' do
  let(:object) { described_class.run(config) }

  subject { object.subjects }

  let(:config) do
    double(
      'Config',
      class:    Mutant::Config,
      subjects: [subject_a, subject_b],
      strategy: strategy,
      reporter: reporter
    )
  end

  let(:reporter)  { double('Reporter')                }
  let(:strategy)  { double('Strategy')                }
  let(:subject_a) { double('Subject A')               }
  let(:subject_b) { double('Subject B')               }
  let(:runner_a)  { double('Runner A', stop?: stop_a) }
  let(:runner_b)  { double('Runner B', stop?: stop_b) }

  before do
    strategy.stub(:setup)
    strategy.stub(:teardown)
    reporter.stub(report: reporter)
    Mutant::Runner.stub(:run).with(config, subject_a).and_return(runner_a)
    Mutant::Runner.stub(:run).with(config, subject_b).and_return(runner_b)
  end

  context 'without early stop' do
    let(:stop_a) { false }
    let(:stop_b) { false }

    it { should eql([runner_a, runner_b]) }

    it_should_behave_like 'an idempotent method'
  end

  context 'with early stop' do
    let(:stop_a) { true  }
    let(:stop_b) { false }

    it { should eql([runner_a]) }

    it_should_behave_like 'an idempotent method'
  end
end

{'fraction_non_alphanumeric': 0.13808463251670378, 'fraction_numerical': 0.0007423904974016332, 'mean_word_length': 3.0044576523031203, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '926974', 'n_tokens_mistral': 936, 'n_tokens_neox': 927, 'n_words': 190}