<commit_before>require "helper"

class SimpleI18nTest < MiniTest::Unit::TestCase
  include FriendlyId::Test

  class Journalist < ActiveRecord::Base
    extend FriendlyId
    friendly_id :name, :use => :simple_i18n
  end

  test "friendly_id should return a the current locale's slug" do
    journalist = Journalist.new(:name => "<NAME>")
    journalist.slug_es = "juan-fulano"
    journalist.valid?
    I18n.with_locale(I18n.default_locale) do
      assert_equal "john-doe", journalist.friendly_id
    end<commit_msg>Fix English grammar error in test definition<commit_after>require "helper"

class SimpleI18nTest < MiniTest::Unit::TestCase
  include FriendlyId::Test

  class Journalist < ActiveRecord::Base
    extend FriendlyId
    friendly_id :name, :use => :simple_i18n
  end

  test "friendly_id should return the current locale's slug" do
    journalist = Journalist.new(:name => "<NAME>")
    journalist.slug_es = "juan-fulano"
    journalist.valid?
    I18n.with_locale(I18n.default_locale) do
      assert_equal "john-doe", journalist.friendly_id
    end
{'fraction_non_alphanumeric': 0.09577464788732394, 'fraction_numerical': 0.015023474178403756, 'mean_word_length': 4.33, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6167643', 'n_tokens_mistral': 347, 'n_tokens_neox': 337, 'n_words': 82}