<commit_before>require_relative '../spec_helper'

describe LemonadeStand::Game do

  describe "creating a game" do

    [
      [4],
      [3],
    ].map { |x| Struct.new(:player_count).new *x }.each do |example|

      describe "multiple examples" do

        let(:game) { LemonadeStand::Game.new example.player_count }

        it "should require the number of players" do
          game.players.count.must_equal example.player_count
        end

        it "should return player objects for each player" do
          game.players.each { |p| p.is_a?(LemonadeStand::Player).must_equal true }
        end

        it "should set the player index on each as an incrementing index" do
          game.players.each_with_index do |player, index|
            player.index.must_equal index
          end
        end

        it "should set the day to 1" do
          game.day.must_equal 1
        end

      end

    end

  end

end<commit_msg>Refactor.<commit_after>require_relative '../spec_helper'

describe LemonadeStand::Game do

  describe "creating a game" do

    [
      [4],
      [3],
    ].map { |x| Struct.new(:player_count).new *x }.each do |example|

      describe "multiple examples" do

        let(:game) { LemonadeStand::Game.new example.player_count }

        describe "players" do
          it "should require the number of players" do
            game.players.count.must_equal example.player_count
          end

          it "should return player objects for each player" do
            game.players.each { |p| p.is_a?(LemonadeStand::Player).must_equal true }
          end

          it "should set the player index on each as an incrementing index" do
            game.players.each_with_index do |player, index|
              player.index.must_equal index
            end
          end
        end

        it "should set the day to 1" do
          game.day.must_equal 1
        end

      end

    end

  end

end
{'fraction_non_alphanumeric': 0.08324715615305067, 'fraction_numerical': 0.004136504653567736, 'mean_word_length': 1.9861111111111112, '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': '6793413', 'n_tokens_mistral': 583, 'n_tokens_neox': 552, 'n_words': 177}