<commit_before># encoding: utf-8

require 'helper'

class TestLocale < Test::Unit::TestCase
  def test_code
    assert_match /./, FFaker::Locale.code
  end

  def test_language
    assert_match /./, FFaker::Locale.language
  end

  def test_language_with_args
    assert_match /./, FFaker::Locale.language('French')
  end

  def test_code_with_args
    assert_match /./, FFaker::Locale.code('FR')
  end
end<commit_msg>Refactored tests for locale methods<commit_after># encoding: utf-8

require 'helper'

class TestLocale < Test::Unit::TestCase
  def test_code
    assert_match /./, FFaker::Locale.code
  end

  def test_language
    assert_match /./, FFaker::Locale.language
  end

  def test_language_with_args
    assert_match 'French', FFaker::Locale.language('FR')
  end

  def test_code_with_args
    assert_match 'FR', FFaker::Locale.code('French')
  end
end
{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.0023148148148148147, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6302111', 'n_tokens_mistral': 302, 'n_tokens_neox': 284, 'n_words': 63}