<commit_before>require 'spec_helper'

describe Barge::Client do
  describe '#access_token' do
    let(:token) { 'some_token' }

    it 'can be set using a hash' do
      barge = described_class.new(access_token: token)
      expect(barge.access_token).to eq(token)
    end

    it 'can be set using a block' do
      barge = described_class.new { |c| c.access_token = token }
      expect(barge.access_token).to eq(token)
    end
  end
end<commit_msg>Add test<commit_after>require 'spec_helper'

describe Barge::Client do
  describe '#access_token' do
    let(:token) { 'some_token' }

    it 'can be set using a hash' do
      barge = described_class.new(access_token: token)
      expect(barge.access_token).to eq(token)
    end

    it 'can be set using a block' do
      barge = described_class.new { |c| c.access_token = token }
      expect(barge.access_token).to eq(token)
    end

    context 'when none is given' do
      specify do
        expect { described_class.new }
          .to raise_error(ArgumentError, 'missing access_token')
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09599254426840634, 'fraction_numerical': 0.0, 'mean_word_length': 2.934065934065934, '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': '3594499', 'n_tokens_mistral': 356, 'n_tokens_neox': 349, 'n_words': 100}