<commit_before>require 'minitest/autorun'
require 'minitest/pride'
require 'mocha/mini_test'
require 'rgeo/active_record/adapter_test_helper'

begin
  require 'byebug'
rescue LoadError
  # ignore
end

class ActiveSupport::TestCase
  self.test_order = :random

  def factory
    ::RGeo::Cartesian.preferred_factory(srid: 3785)
  end

  def geographic_factory<commit_msg>Add a test SpatialModel class<commit_after>require 'minitest/autorun'
require 'minitest/pride'
require 'mocha/mini_test'
require 'rgeo/active_record/adapter_test_helper'

begin
  require 'byebug'
rescue LoadError
  # ignore
end

class ActiveSupport::TestCase
  self.test_order = :random

  DATABASE_CONFIG_PATH = ::File.dirname(__FILE__) << '/database.yml'

  class SpatialModel < ::ActiveRecord::Base
    establish_connection ::YAML.load_file(DATABASE_CONFIG_PATH)
  end

  def factory
    ::RGeo::Cartesian.preferred_factory(srid: 3785)
  end

  def geographic_factory
{'fraction_non_alphanumeric': 0.09158679446219382, 'fraction_numerical': 0.008519701810436636, 'mean_word_length': 5.666666666666667, 'pattern_counts': {'":': 0, '<': 6, '<?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': '1028192', 'n_tokens_mistral': 339, 'n_tokens_neox': 319, 'n_words': 64}