<commit_before>ENV["RAILS_ENV"] = "test"
$:.unshift File.dirname(__FILE__)
$:.unshift File.expand_path('../../lib', __FILE__)

require "scenario/config/environment"
require "rails/test_help"
require 'rspec/rails'
require 'sham_rack'
require 'rots'

Webrat.configure do |config|
  config.mode = :rails
  config.open_error_files = false
end

# This is mostly copied in from bin/rots; they don't provide a single app class we could just reuse, unfortunately

rots_config = YAML.load(<<-ROTS_CONFIG)
# Default configuration file
identity: john.doe<commit_msg>Make sure stubs get cleared after test cases<commit_after>ENV["RAILS_ENV"] = "test"
$:.unshift File.dirname(__FILE__)
$:.unshift File.expand_path('../../lib', __FILE__)

require "scenario/config/environment"
require "rails/test_help"
require 'rspec/rails'
require 'sham_rack'
require 'rots'

Webrat.configure do |config|
  config.mode = :rails
  config.open_error_files = false
end

RSpec.configure do |config| 
  config.mock_with :mocha 
end

# This is mostly copied in from bin/rots; they don't provide a single app class we could just reuse, unfortunately

rots_config = YAML.load(<<-ROTS_CONFIG)
# Default configuration file
identity: john.doe
{'fraction_non_alphanumeric': 0.11730449251247921, 'fraction_numerical': 0.0, 'mean_word_length': 5.298429319371728, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6301684', 'n_tokens_mistral': 410, 'n_tokens_neox': 391, 'n_words': 114}