<commit_before>require "spec_helper"

module JotForm
  describe API do
    let(:api) { API.new(ENV["JOTFORM_API_KEY"]) }

    describe "limit-left handling" do
      it "should not initially know the limit value" do
        api.limit_left.should be_nil
      end

      it "should decrease limit_left for each request" do
        VCR.use_cassette("limit_left") do
          api.request("user", method: :get)
          limit_left = api.limit_left
          api.request("user", method: :get)
          api.limit_left.should eq limit_left - 1
        end
      end
    end

    context ".user" do
      it "should return a User instance" do
        api.user.should be_instance_of(User)
      end
    end
  end
end<commit_msg>Fix small typo in api spec<commit_after>require "spec_helper"

module JotForm
  describe API do
    let(:api) { API.new(ENV["JOTFORM_API_KEY"]) }

    describe "limit-left handling" do
      it "should not initially know the limit value" do
        api.limit_left.should be_nil
      end

      it "should decrease limit_left for each request" do
        VCR.use_cassette("limit_left") do
          api.request("user", method: :get)
          limit_left = api.limit_left
          api.request("user", method: :get)
          api.limit_left.should eq limit_left - 1
        end
      end
    end

    context "#user" do
      it "should return a User instance" do
        api.user.should be_instance_of(User)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08373369938229239, 'fraction_numerical': 0.0013726835964310226, 'mean_word_length': 2.291196388261851, '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': '1518365', 'n_tokens_mistral': 455, 'n_tokens_neox': 446, 'n_words': 136}