<commit_before>require(File.join(File.dirname(__FILE__), 'test_helper'))

unit_tests do
  
  test "formats two authors sorting alphabetically joined with 'and'" do
    citation = CiteMe::Citation.new(:authors => ["<NAME>", "<NAME>"])
    CiteMe::Citation.publicize_methods do 
      assert_equal "<NAME> and <NAME>", citation.formatted_authors
    end
  end
  
  test "formats three authors with first and 'et al'" do<commit_msg>added test sample for initialization<commit_after>require(File.join(File.dirname(__FILE__), 'test_helper'))

unit_tests do
  
  test "initializes with attr hash" do
    assert_nothing_raised do
      citation = CiteMe::Citation.new(:authors => ["Test Author"])
      assert_equal ["Test Author"], citation.authors
    end
  end
  
  test "formats two authors sorting alphabetically joined with 'and'" do
    citation = CiteMe::Citation.new(:authors => ["<NAME>", "<NAME>"])
    CiteMe::Citation.publicize_methods do 
      assert_equal "<NAME> and <NAME>", citation.formatted_authors
    end
  end
  
  test "formats three authors with first and 'et al'" do
{'fraction_non_alphanumeric': 0.11694290976058933, 'fraction_numerical': 0.0, 'mean_word_length': 4.328431372549019, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, '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': '6113594', 'n_tokens_mistral': 343, 'n_tokens_neox': 319, 'n_words': 95}