<commit_before>require "spec_helper"

describe Array do
  context "#all_empty?" do
    it "returns true if all elements of the Array are empty" do
      expect(["", "", ""].all_empty?).to eq true
    end

    it "returns false if some of the Array elements are not empty" do
      expect(["", "1", "", Object.new, :a].all_empty?).to eq false
    end

    it "returns true for an empty Array" do
      expect([].all_empty?).to eq true
    end
  end

  context "#all_same?" do
    it "returns true if all elements of the Array are the same" do
      expect(["A", "A", "A"].all_same?).to eq true
    end

    it "returns false if some of the Array elements are not the same" do
      expect(["", 1, "", Object.new, :a].all_same?).to eq false
    end

    it "returns true for an empty Array" do
      expect([].all_same?).to eq true
    end
  end

  context "#any_empty?" do
    it "returns true if any element of the Array is empty" do
      expect(["", 1, 2].any_empty?).to eq true
    end

    it "returns false if none of the elements of the Array are empty" do
      expect(["A", "B", "C"].any_empty?).to eq false
    end
  end
end<commit_msg>wrote tests for non_empty? method<commit_after>require "spec_helper"

describe Array do
  context "#all_empty?" do
    it "returns true if all elements of the Array are empty" do
      expect(["", "", ""].all_empty?).to eq true
    end

    it "returns false if some of the Array elements are not empty" do
      expect(["", "1", "", Object.new, :a].all_empty?).to eq false
    end

    it "returns true for an empty Array" do
      expect([].all_empty?).to eq true
    end
  end

  context "#all_same?" do
    it "returns true if all elements of the Array are the same" do
      expect(["A", "A", "A"].all_same?).to eq true
    end

    it "returns false if some of the Array elements are not the same" do
      expect(["", 1, "", Object.new, :a].all_same?).to eq false
    end

    it "returns true for an empty Array" do
      expect([].all_same?).to eq true
    end
  end

  context "#any_empty?" do
    it "returns true if any element of the Array is empty" do
      expect(["", 1, 2].any_empty?).to eq true
    end

    it "returns false if none of the elements of the Array are empty" do
      expect(["A", "B", "C"].any_empty?).to eq false
    end
  end

  context "#none_empty?" do
    it "returns true if any element of the Array is empty" do
      expect(["", 1, 2].none_empty?).to eq false
    end

    it "returns false if none of the elements of the Array are empty" do
      expect(["A", "B", "C"].none_empty?).to eq true
    end
  end  
end
{'fraction_non_alphanumeric': 0.12033833141099577, 'fraction_numerical': 0.0038446751249519417, 'mean_word_length': 2.690780141843972, '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': '3923633', 'n_tokens_mistral': 845, 'n_tokens_neox': 799, 'n_words': 359}