<commit_before>require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

describe Hamster::Hash do

  describe "#all?" do

    describe "when empty" do

      before do
        @hash = Hamster.hash
      end

      it "with a block returns true" do
        @hash.all? {}.should be_true
      end

      it "with no block returns true" do
        @hash.all?.should be_true
      end

    end

    describe "when not empty" do

      before do
        @hash = Hamster.hash("A" => "aye", "B" => "bee", "C" => "see")
      end

      describe "with a block" do

        it "returns true if the block always returns true" do
          @hash.all? { |item| true }.should be_true
        end

        it "returns false if the block ever returns false" do
          @hash.all? { |key, value| key == "D" || value == "dee" }.should be_false
        end

      end

      describe "with no block" do

        it "returns true" do
          @hash.all?.should be_true
        end

      end

    end

  end

end
<commit_msg>Fix broken build.<commit_after>require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

describe Hamster::Hash do

  describe "#all?" do

    describe "when empty" do

      before do
        @hash = Hamster.hash
      end

      it "with a block returns true" do
        @hash.all? {}.should be_true
      end

      it "with no block returns true" do
        @hash.all?.should be_true
      end

    end

    describe "when not empty" do

      before do
        @hash = Hamster.hash("A" => "aye", "B" => "bee", "C" => "see")
      end

      describe "with a block" do

        it "returns true if the block always returns true" do
          @hash.all? { |key, value| true }.should be_true
        end

        it "returns false if the block ever returns false" do
          @hash.all? { |key, value| key == "D" || value == "dee" }.should be_false
        end

      end

      describe "with no block" do

        it "returns true" do
          @hash.all?.should be_true
        end

      end

    end

  end

end

{'fraction_non_alphanumeric': 0.10970873786407767, 'fraction_numerical': 0.0, 'mean_word_length': 1.796472184531886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1658847', 'n_tokens_mistral': 655, 'n_tokens_neox': 616, 'n_words': 229}