<commit_before>require 'rspec'
require 'restpack_service/support/spec_helper'

require 'pry' #TODO: GJ: move to base

require 'restpack_user_service'

config = YAML.load_file('./config/database.yml')
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || config['test'])

migrations_path = File.dirname(__FILE__) + "/../db/migrate"
migrations = ActiveRecord::Migrator.up(migrations_path)

FactoryGirl.find_definitions

DatabaseCleaner.strategy = :transaction

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods

  config.before(:each) do
    DatabaseCleaner.start
  end

  config.after(:each) do
    DatabaseCleaner.clean
  end
end<commit_msg>extracted spec_helper setup<commit_after>require 'restpack_service/support/spec_helper'
require 'restpack_user_service'

setup
{'fraction_non_alphanumeric': 0.1125, 'fraction_numerical': 0.0, 'mean_word_length': 6.701923076923077, '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': '2087523', 'n_tokens_mistral': 262, 'n_tokens_neox': 258, 'n_words': 45}