<commit_before>require 'rubygems'

ENV["RAILS_ENV"] ||= 'test'
ENV['DB_CLEANER_STRATEGY'] ||= 'transaction'
ENV['UV_SUBDOMAIN_NAME'] ||= 'uv'
ENV['UV_API_KEY'] ||= '1'
ENV['UV_API_SECRET'] ||= '1'
ENV['MXIT_CLIENT_ID'] ||= '1'
ENV['SHINKA_AUID'] ||= '1'
ENV['GA_TRACKING_CODE'] ||= 'UA-00000000-3'
ENV['FREEPAID_USER'] ||= '1'
ENV['FREEPAID_PASS'] ||= '1'
ENV['MXIT_VENDOR_ID'] ||= '1'
ENV['SESSION_TOKEN'] ||= ('a' * 31)

if (ENV['COVERAGE'] == 'on')
  require 'simplecov'
  require 'simplecov-rcov'
  class SimpleCov::Formatter::MergedFormatter
    def format(result)
      SimpleCov::Formatter::HTMLFormatter.new.format(result)
      SimpleCov::Formatter::RcovFormatter.new.format(result)
    end
  end
  SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter
  SimpleCov.start 'rails' do
    add_filter "/vendor/"
  end
end

if ENV['COVERALLS']
  require 'coveralls'
  Coveralls.wear!('rails')
end

require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'webmock/rspec'
require 'database_cleaner'


WebMock.disable_net_connect!(:allow_localhost => true)
def in_memory_database?<commit_msg>add default for ENV['USER_ACCOUNT_API'] ||= 'http://user.example.com/api'<commit_after>require 'rubygems'

ENV["RAILS_ENV"] ||= 'test'
ENV['DB_CLEANER_STRATEGY'] ||= 'transaction'
ENV['UV_SUBDOMAIN_NAME'] ||= 'uv'
ENV['UV_API_KEY'] ||= '1'
ENV['UV_API_SECRET'] ||= '1'
ENV['MXIT_CLIENT_ID'] ||= '1'
ENV['SHINKA_AUID'] ||= '1'
ENV['GA_TRACKING_CODE'] ||= 'UA-00000000-3'
ENV['MXIT_VENDOR_ID'] ||= '1'
ENV['USER_ACCOUNT_API'] ||= 'http://user.example.com/api'
ENV['SESSION_TOKEN'] ||= ('a' * 31)

if (ENV['COVERAGE'] == 'on')
  require 'simplecov'
  require 'simplecov-rcov'
  class SimpleCov::Formatter::MergedFormatter
    def format(result)
      SimpleCov::Formatter::HTMLFormatter.new.format(result)
      SimpleCov::Formatter::RcovFormatter.new.format(result)
    end
  end
  SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter
  SimpleCov.start 'rails' do
    add_filter "/vendor/"
  end
end

if ENV['COVERALLS']
  require 'coveralls'
  Coveralls.wear!('rails')
end

require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'webmock/rspec'
require 'database_cleaner'


WebMock.disable_net_connect!(:allow_localhost => true)
def in_memory_database?
{'fraction_non_alphanumeric': 0.18319327731092436, 'fraction_numerical': 0.014285714285714285, 'mean_word_length': 6.193353474320242, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '2599070', 'n_tokens_mistral': 931, 'n_tokens_neox': 918, 'n_words': 145}