<commit_before>require 'test/unit'
require 'rubygems'

%w(actionpack activesupport actionmailer).each{ |gem_lib| gem gem_lib, '3.0.0' }
%w(active_support action_pack action_mailer action_controller action_dispatch).each{ |lib| require lib }

plugin_root = File.join(File.dirname(__FILE__), '..')
require "#{plugin_root}/lib/route_translator"

require 'ruby-debug'

# require 'rails'
# module Rails ; mattr_accessor :root; end
# class TestApp < Rails::Application ; end
#
# Rails.root = plugin_root
# Rails.logger = Logger.new(STDOUT)

class PeopleController < ActionController::Base;  end

class TranslateRoutesTest < ActionController::TestCase
  include ActionDispatch::Assertions::RoutingAssertions

  def config_default_locale_settings locale, with_prefix
    I18n.default_locale = locale
    @route_translator.prefix_on_default_locale = with_prefix
  end

  def translate_routes
    @route_translator.translate @routes
    @routes.finalize!
    @routes.named_routes.install
  end

  def setup
    @controller = ActionController::Base.new
    @view = ActionView::Base.new
    @routes = ActionDispatch::Routing::RouteSet.new
    @route_translator = RouteTranslator.new
  end<commit_msg>removed ruby-debug require from test file<commit_after>require 'test/unit'
require 'rubygems'

%w(actionpack activesupport actionmailer).each{ |gem_lib| gem gem_lib, '3.0.0' }
%w(active_support action_pack action_mailer action_controller action_dispatch).each{ |lib| require lib }

plugin_root = File.join(File.dirname(__FILE__), '..')
require "#{plugin_root}/lib/route_translator"


class PeopleController < ActionController::Base;  end

class TranslateRoutesTest < ActionController::TestCase
  include ActionDispatch::Assertions::RoutingAssertions

  def config_default_locale_settings locale, with_prefix
    I18n.default_locale = locale
    @route_translator.prefix_on_default_locale = with_prefix
  end

  def translate_routes
    @route_translator.translate @routes
    @routes.finalize!
    @routes.named_routes.install
  end

  def setup
    @controller = ActionController::Base.new
    @view = ActionView::Base.new
    @routes = ActionDispatch::Routing::RouteSet.new
    @route_translator = RouteTranslator.new
  end
{'fraction_non_alphanumeric': 0.09670131043831902, 'fraction_numerical': 0.004518752824220515, 'mean_word_length': 5.511764705882353, 'pattern_counts': {'":': 0, '<': 8, '<?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': '1981115', 'n_tokens_mistral': 689, 'n_tokens_neox': 690, 'n_words': 139}