<commit_before>$LOAD_PATH.unshift(File.dirname(__FILE__))
ENV["RAILS_ENV"] = "test"

require File.expand_path("../config/environment", __dir__)

require "maxitest/autorun"
require "rails/test_help"
require "mocha/minitest"
require "slimmer/test"
require "factories"
require "webmock/minitest"
require "whitehall/not_quite_as_fake_search"
require "whitehall/search_index"
require "sidekiq/testing"
require "govuk-content-schema-test-helpers/test_unit"
require "parallel_tests/test/runtime_logger"

Dir[Rails.root.join("test/support/*.rb")].sort.each { |f| require f }

Mocha.configure do |c|
  c.stubbing_non_existent_method = :prevent
end

GovukContentSchemaTestHelpers.configure do |config|
  config.schema_type = "publisher_v2"<commit_msg>Fix mocha deprecation warning<commit_after>$LOAD_PATH.unshift(File.dirname(__FILE__))
ENV["RAILS_ENV"] = "test"

require File.expand_path("../config/environment", __dir__)

require "maxitest/autorun"
require "rails/test_help"
require "mocha/minitest"
require "slimmer/test"
require "factories"
require "webmock/minitest"
require "whitehall/not_quite_as_fake_search"
require "whitehall/search_index"
require "sidekiq/testing"
require "govuk-content-schema-test-helpers/test_unit"
require "parallel_tests/test/runtime_logger"

Dir[Rails.root.join("test/support/*.rb")].sort.each { |f| require f }

Mocha.configure do |c|
  c.reinstate_undocumented_behaviour_from_v1_9 = false
  c.stubbing_non_existent_method = :prevent
end

GovukContentSchemaTestHelpers.configure do |config|
  config.schema_type = "publisher_v2"
{'fraction_non_alphanumeric': 0.12363168061815841, 'fraction_numerical': 0.0025756600128783, 'mean_word_length': 7.26595744680851, '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': '192035', 'n_tokens_mistral': 559, 'n_tokens_neox': 555, 'n_words': 90}