<commit_before>require_relative '../lib/judopay'
require 'i18n'

#require 'factory_girl'
#require 'factories'
require 'webmock/rspec'

# Added to counter deprecation warning
I18n.enforce_available_locales = true

RSpec.configure do |config|
  #config.include FactoryGirl::Syntax::Methods
  config.include WebMock::API
end

# Use Judopay default configuration
Judopay.configure

def stub_get(path)
  stub_request(:get, /judopay/i)
end

def stub_post(path)
  stub_request(:post, /judopay/i)
end

def fixture_path
  File.expand_path("../fixtures", __FILE__)
end

def fixture(file)
  File.new(fixture_path + '/' + file)
end<commit_msg>Enable Rspec :should syntax because Webmock doesn't support :expect yet<commit_after>require_relative '../lib/judopay'
require 'i18n'

#require 'factory_girl'
#require 'factories'
require 'webmock/rspec'

# Added to counter deprecation warning
I18n.enforce_available_locales = true

RSpec.configure do |config|
  #config.include FactoryGirl::Syntax::Methods
  config.include WebMock::API

  config.expect_with :rspec do |c|
    c.syntax = [:expect, :should]
  end
end

# Use Judopay default configuration
Judopay.configure

def stub_get(path)
  stub_request(:get, /judopay/i)
end

def stub_post(path)
  stub_request(:post, /judopay/i)
end

def fixture_path
  File.expand_path("../fixtures", __FILE__)
end

def fixture(file)
  File.new(fixture_path + '/' + file)
end
{'fraction_non_alphanumeric': 0.11318051575931232, 'fraction_numerical': 0.0057306590257879654, 'mean_word_length': 5.35, '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': '4077325', 'n_tokens_mistral': 502, 'n_tokens_neox': 493, 'n_words': 116}