<commit_before>require_relative "../../../lib/query_string_search/comparator"

RSpec.describe QueryStringSearch::Comparator do
  describe "equality" do
    describe "Using an equality operator" do
      describe "compare_with?" do
        it "returns true if the values are equal?" do
          value = rand
          comparison = QueryStringSearch::Comparator.using("=").does(value).compare_with?(value)
          expect(comparison).to be_truthy
        end
      end
    end

    describe "Using the equal? alias" do
      it "returns true if the values are equal?" do
        value = rand
        comparison = QueryStringSearch::Comparator.does(value).equal?(value)
        expect(comparison).to be_truthy
      end
    end
  end

  describe "member of" do
    describe "Using the ∈ operator" do
      describe "compare_with?" do
        it "returns true if the values is a member of the collection" do
          set = [1, 2, 3]
          value = set.sample
          comparison = QueryStringSearch::Comparator.using("∈").does(set).compare_with?(value)
          expect(comparison).to be_truthy
        end
      end
    end

    describe "Using the contain? alias" do
      it "returns true if the values is a member of the collection" do
        set = [1, 2, 3]
        value = set.sample
        comparison = QueryStringSearch::Comparator.does(set).contain?(value)
        expect(comparison).to be_truthy
      end
    end
  end
end<commit_msg>no longer using that goofy symbol, thankfully<commit_after>require_relative "../../../lib/query_string_search/comparator"

RSpec.describe QueryStringSearch::Comparator do
  describe "equality" do
    describe "Using an equality operator" do
      describe "compare_with?" do
        it "returns true if the values are equal?" do
          value = rand
          comparison = QueryStringSearch::Comparator.using("=").does(value).compare_with?(value)
          expect(comparison).to be_truthy
        end
      end
    end

    describe "Using the equal? alias" do
      it "returns true if the values are equal?" do
        value = rand
        comparison = QueryStringSearch::Comparator.does(value).equal?(value)
        expect(comparison).to be_truthy
      end
    end
  end

  describe "member of" do
    describe "Using the ∈ operator" do
      describe "compare_with?" do
        it "returns true if the values is a member of the collection" do
          set = [1, 2, 3]
          value = set.sample
          comparison = QueryStringSearch::Comparator.using("&").does(set).compare_with?(value)
          expect(comparison).to be_truthy
        end
      end
    end

    describe "Using the contain? alias" do
      it "returns true if the values is a member of the collection" do
        set = [1, 2, 3]
        value = set.sample
        comparison = QueryStringSearch::Comparator.does(set).contain?(value)
        expect(comparison).to be_truthy
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08901773533424284, 'fraction_numerical': 0.004092769440654843, 'mean_word_length': 2.4792408066429417, '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': '1554296', 'n_tokens_mistral': 815, 'n_tokens_neox': 813, 'n_words': 267}