<commit_before># encoding: utf-8
require 'spec_helper'

describe OrchestrateIo::Search do
  let(:client){ OrchestrateIo::Client.new(apikey: 'abc') }

  describe "GET /:version/:collection" do
    it "returns a list of collection" do
      request_query = 'Genre:crime'

      request = client.search :get do
        collection  "films"
        query        request_query
      end
      response = request.perform

      expect(response.code).to eql 200
      body = load_json(response.body)["results"].first["value"]
      expect(body["Genre"]).to eql "Crime, Drama"
    end

    it "raises ArgumentError if the query string is missing" do
      request = client.search(:get){ collection  "films" }
      expect{ request.perform }.to raise_error(ArgumentError)
    end
  end
end
<commit_msg>Get rid of ArgumentError and :snake:<commit_after># encoding: utf-8
require 'spec_helper'

describe OrchestrateIo::Search do
  let(:client){ OrchestrateIo::Client.new(api_key: 'abc') }

  describe "GET /:version/:collection" do
    it "returns a list of collection" do
      request_query = 'Genre:crime'

      request = client.search :get do
        collection  "films"
        query        request_query
      end
      response = request.perform

      expect(response.code).to eql 200
      body = load_json(response.body)["results"].first["value"]
      expect(body["Genre"]).to eql "Crime, Drama"
    end
  end
end

{'fraction_non_alphanumeric': 0.11103253182461104, 'fraction_numerical': 0.005657708628005658, 'mean_word_length': 3.0895953757225434, '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': '3811878', 'n_tokens_mistral': 447, 'n_tokens_neox': 426, 'n_words': 118}