<commit_before>require 'simplecov'
SimpleCov.start

require 'rubygems'

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'


# Add this to load Capybara integration:
require 'capybara/rspec'
require 'capybara/rails'

RSpec.configure do |config|
  #mix in FactoryGirl methods
  config.include Factory::Syntax::Methods
  
  config.mock_with :rspec
  require 'database_cleaner'

  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.orm = "mongoid"
  end

  config.before(:each) do
    Ohm.flush
    DatabaseCleaner.clean
  end 

  config.after(:suite) do
    Ohm.flush
    DatabaseCleaner.clean
  end

end

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
Dir[Rails.root.join("spec/helpers/*.rb")].each {|f| require f}
<commit_msg>One little capybara slipped throught my fingers... Kill the beast! Now we can be testing one, two, soundcheck everything seems okay again!<commit_after>require 'simplecov'
SimpleCov.start

require 'rubygems'

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'

RSpec.configure do |config|
  #mix in FactoryGirl methods
  config.include Factory::Syntax::Methods
  
  config.mock_with :rspec
  require 'database_cleaner'

  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.orm = "mongoid"
  end

  config.before(:each) do
    Ohm.flush
    DatabaseCleaner.clean
  end 

  config.after(:suite) do
    Ohm.flush
    DatabaseCleaner.clean
  end

end

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
Dir[Rails.root.join("spec/helpers/*.rb")].each {|f| require f}

{'fraction_non_alphanumeric': 0.11963775023832221, 'fraction_numerical': 0.0, 'mean_word_length': 4.273869346733668, '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': '4086478', 'n_tokens_mistral': 700, 'n_tokens_neox': 679, 'n_words': 187}