<commit_before>describe USI::Resource::Score do
  describe '#cp' do
    let(:score) { USI::Resource::Score.new(args) }

    context '`cp` is included' do
      let(:args) { ["cp", "-1521"] }

      it "returns the cp(centi pawn) value on Fixnum" do
        expect(score.cp).to eq -1521
      end
    end

    context '`cp` is not included' do
      let(:args) { ["mate", "+"] }

      it do
        expect(score.cp).to be nil
      end
    end

    context '`lowerbound` or `upperbound` is included' do
      let(:args) { ["cp", "-9999", "lowerbound"] }

      it "returns the cp(centi pawn) value on Fixnum" do
        expect(score.cp).to eq -9999
      end
    end
  end
end<commit_msg>Set mate, getter returns String of mate.<commit_after>describe USI::Resource::Score do
  describe '#cp' do
    let(:score) { USI::Resource::Score.new(args) }

    context '`cp` is included' do
      let(:args) { ["cp", "-1521"] }

      it "returns the cp(centi pawn) value on Fixnum" do
        expect(score.cp).to eq -1521
      end
    end

    context '`cp` is not included' do
      let(:args) { ["mate", "+"] }

      it do
        expect(score.cp).to be nil
      end
    end

    context '`lowerbound` or `upperbound` is included' do
      let(:args) { ["cp", "-9999", "lowerbound"] }

      it "returns the cp(centi pawn) value on Fixnum" do
        expect(score.cp).to eq -9999
      end
    end
  end

  describe '#mate' do
    let(:score) { USI::Resource::Score.new(args) }

    context '`mate` is included' do
      let(:args) { ["mate", "+"] }

      it "returns the mate value" do
        expect(score.mate).to eq "+"
      end
    end

    context '`mate` is not included' do
      let(:args) { ["cp", "-1521"] }

      it do
        expect(score.mate).to be nil
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.14715719063545152, 'fraction_numerical': 0.020066889632107024, 'mean_word_length': 2.2284172661870505, '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': '4603107', 'n_tokens_mistral': 637, 'n_tokens_neox': 591, 'n_words': 188}