<commit_before>require 'spec_helper'

describe Ayadn::API do
	before do
    Ayadn::Settings.stub(:options).and_return({
        counts: {
          default: 50
        },
        timeline: {
          directed: 1,
          deleted: 0,
          html: 0,
          annotations: 1
        }
      })
  end
  describe ".build_query" do
    it 'returns a URL with count=12' do
      expect(Ayadn::API.build_query({count: 12})).to match /count=12/
    end
    it 'returns a URL with directed=0' do
      expect(Ayadn::API.build_query({directed: 0})).to match /directed=0/
    end
    it 'returns a URL with html=1' do
      expect(Ayadn::API.build_query({html: 1})).to match /html=1/
    end<commit_msg>api test<commit_after>require 'spec_helper'

describe Ayadn::API do
	before do
    Ayadn::Settings.stub(:options).and_return({
        counts: {
          default: 50
        },
        timeline: {
          directed: 1,
          deleted: 0,
          html: 0,
          annotations: 1
        }
      })
  end
  describe ".build_query" do
    it 'returns a URL with count=12' do
      expect(Ayadn::API.build_query({count: 12})).to match /count=12/
    end
    it 'returns a URL with directed=0' do
      expect(Ayadn::API.build_query({directed: 0})).to match /directed_posts=0/
    end
    it 'returns a URL with html=1' do
      expect(Ayadn::API.build_query({html: 1})).to match /html=1/
    end
{'fraction_non_alphanumeric': 0.12437455325232309, 'fraction_numerical': 0.02573266619013581, 'mean_word_length': 2.1818181818181817, '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': '7111201', 'n_tokens_mistral': 500, 'n_tokens_neox': 467, 'n_words': 120}