<commit_before>require 'minitest/autorun'
require_relative 'phone_number'

class PhoneNumberTest < MiniTest::Unit::TestCase

  def test_cleans_number
    number = PhoneNumber.new("(123) 456-7890").number
    assert_equal "1234567890", number
  end

  def test_cleans_number_with_dots
    skip
    number = PhoneNumber.new("123.456.7890").number
    assert_equal "1234567890", number
  end

  def test_valid_when_11_digits_and_first_is_1
    skip
    number = PhoneNumber.new("11234567890").number
    assert_equal "1234567890", number
  end

  def test_invalid_when_11_digits
    skip
    number = PhoneNumber.new("21234567890").number
    assert_equal "0000000000", number
  end

  def test_invalid_when_9_digits
    skip
    number = PhoneNumber.new("123456789").number
    assert_equal "0000000000", number
  end
<commit_msg>Add test case for letters in phone number (ruby)<commit_after>gem 'minitest'
require 'minitest/autorun'
require_relative 'phone_number'

class PhoneNumberTest < MiniTest::Unit::TestCase

  def test_cleans_number
    number = PhoneNumber.new("(123) 456-7890").number
    assert_equal "1234567890", number
  end

  def test_cleans_number_with_dots
    skip
    number = PhoneNumber.new("123.456.7890").number
    assert_equal "1234567890", number
  end

  def test_valid_when_11_digits_and_first_is_1
    skip
    number = PhoneNumber.new("11234567890").number
    assert_equal "1234567890", number
  end

  def test_invalid_with_letters
    skip
    number = PhoneNumber.new("123-abc-1234").number
    assert_equal "0000000000", number
  end

  def test_invalid_when_11_digits
    skip
    number = PhoneNumber.new("21234567890").number
    assert_equal "0000000000", number
  end

  def test_invalid_when_9_digits
    skip
    number = PhoneNumber.new("123456789").number
    assert_equal "0000000000", number
  end

{'fraction_non_alphanumeric': 0.0824295010845987, 'fraction_numerical': 0.12527114967462039, 'mean_word_length': 4.271428571428571, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 5, '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': '3101516', 'n_tokens_mistral': 766, 'n_tokens_neox': 594, 'n_words': 123}