<commit_before>require_relative '../test_helper'
require 'capybara/rails'
require 'capybara/mechanize'
require 'webmock'

DatabaseCleaner.strategy = :truncation

class ActionDispatch::IntegrationTest
  include Capybara::DSL
  include WebMock

  def setup
    DatabaseCleaner.clean

    WebMock.allow_net_connect!
    stub_request(:get, /assets\.test\.gov\.uk/).to_return(status: 404)
  end

  def teardown
    DatabaseCleaner.clean
    WebMock.reset!  # Not entirely sure whether this happens anyway<commit_msg>Use WebMock::API instead of deprecated WebMock.<commit_after>require_relative '../test_helper'
require 'capybara/rails'
require 'capybara/mechanize'
require 'webmock'

DatabaseCleaner.strategy = :truncation

class ActionDispatch::IntegrationTest
  include Capybara::DSL
  include WebMock::API

  def setup
    DatabaseCleaner.clean

    WebMock.allow_net_connect!
    stub_request(:get, /assets\.test\.gov\.uk/).to_return(status: 404)
  end

  def teardown
    DatabaseCleaner.clean
    WebMock.reset!  # Not entirely sure whether this happens anyway
{'fraction_non_alphanumeric': 0.09142318567389256, 'fraction_numerical': 0.005655042412818096, 'mean_word_length': 4.619047619047619, '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': '7579097', 'n_tokens_mistral': 349, 'n_tokens_neox': 329, 'n_words': 74}