<commit_before>require 'test/unit'
require_relative '../../Extractors/statusExtractor'

class StatusExtractorTests < Test::Unit::TestCase
  def test_extract_done_status
    action = "- DONE - first task"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_equal("DONE", status)
  end

  def test_extract_delayed_and_not_done_status
    action = "- delayed, - this is delayed task"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_equal("delayed, -", status)
  end

  def test_extract_delayed_and_done_status
    action = "- delayed, DONE - this is delayed, but done task"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_equal("delayed, DONE", status)
  end

  def test_extract_aborted_status
    action = "- ABORTED - this is aborted task"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_equal("ABORTED", status)
  end
end
<commit_msg>Adds test for empty status<commit_after>require 'test/unit'
require_relative '../../Extractors/statusExtractor'

class StatusExtractorTests < Test::Unit::TestCase
  def test_extract_done_status
    action = "- DONE - first task"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_equal("DONE", status)
  end

  def test_extract_delayed_and_not_done_status
    action = "- delayed, - this is delayed task"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_equal("delayed, -", status)
  end

  def test_extract_delayed_and_done_status
    action = "- delayed, DONE - this is delayed, but done task"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_equal("delayed, DONE", status)
  end

  def test_extract_aborted_status
    action = "- ABORTED - this is aborted task"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_equal("ABORTED", status)
  end

  def test_no_status
    action = "- task without any status yet"

    extractor = StatusExtractor.new(action)
    status = extractor.extractStatus

    assert_not_nil(status) # returns not empty string but we don't care what is it exactly
  end
end

{'fraction_non_alphanumeric': 0.08479020979020979, 'fraction_numerical': 0.0, 'mean_word_length': 3.76875, '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': '6978235', 'n_tokens_mistral': 704, 'n_tokens_neox': 681, 'n_words': 170}