<commit_before>RSpec.describe Mutant::Reporter::CLI::Tput do
  describe '.detect' do
    subject { described_class.detect }

    def expect_command(command, stdout, success)
      allow(Open3).to receive(:capture3).with(command).ordered.and_return(
        [
          stdout,
          instance_double(IO),
          instance_double(Process::Status, success?: success)
        ]
      )
    end

    let(:tput_reset?) { true }
    let(:tput_sc?)    { true }
    let(:tput_rc?)    { true }
    let(:tput_ed?)    { true }

    before do
      expect_command('tput reset', '[reset]', tput_reset?)
      expect_command('tput sc', '[sc]', tput_sc?)
      expect_command('tput rc', '[rc]', tput_rc?)
      expect_command('tput ed', '[ed]', tput_ed?)<commit_msg>Fix rspec warning about ordered stubs<commit_after>RSpec.describe Mutant::Reporter::CLI::Tput do
  describe '.detect' do
    subject { described_class.detect }

    def expect_command(command, stdout, success)
      allow(Open3).to receive(:capture3).with(command).and_return(
        [
          stdout,
          instance_double(IO),
          instance_double(Process::Status, success?: success)
        ]
      )
    end

    let(:tput_reset?) { true }
    let(:tput_sc?)    { true }
    let(:tput_rc?)    { true }
    let(:tput_ed?)    { true }

    before do
      expect_command('tput reset', '[reset]', tput_reset?)
      expect_command('tput sc', '[sc]', tput_sc?)
      expect_command('tput rc', '[rc]', tput_rc?)
      expect_command('tput ed', '[ed]', tput_ed?)
{'fraction_non_alphanumeric': 0.14856020942408377, 'fraction_numerical': 0.002617801047120419, 'mean_word_length': 2.9104859335038364, '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': '5096697', 'n_tokens_mistral': 510, 'n_tokens_neox': 499, 'n_words': 96}