<commit_before>require 'date'
require 'minitest/autorun'
require_relative 'year'

class Date
  def leap?
    throw "Try to implement this yourself instead of using Ruby's implementation."
  end

  alias :gregorian_leap? :leap?
  alias :julian_leap? :leap?
end

class YearTest < MiniTest::Unit::TestCase
  def test_leap_year
    assert Year.leap?(1996)
  end

  def test_non_leap_year
    skip
    refute Year.leap?(1997)
  end

  def test_non_leap_even_year
    skip
    refute Year.leap?(1998)
  end

  def test_century
    skip
    refute Year.leap?(1900)
  end

  def test_fourth_century
    skip
    assert Year.leap?(2400)
  end
end<commit_msg>Add helpful error messages to 'leap'<commit_after>require 'date'
require 'minitest/autorun'
require_relative 'year'

class Date
  def leap?
    throw "Try to implement this yourself instead of using Ruby's implementation."
  end

  alias :gregorian_leap? :leap?
  alias :julian_leap? :leap?
end

class YearTest < MiniTest::Unit::TestCase
  def test_leap_year
    assert Year.leap?(1996), "Yes, 1996 is a leap year"
  end

  def test_non_leap_year
    skip
    refute Year.leap?(1997), "No, 1997 is not a leap year"
  end

  def test_non_leap_even_year
    skip
    refute Year.leap?(1998), "No, 1998 is not a leap year"
  end

  def test_century
    skip
    refute Year.leap?(1900), "No, 1900 is not a leap year"
  end

  def test_fourth_century
    skip
    assert Year.leap?(2400), "Yes, 2400 is a leap year"
  end
end
{'fraction_non_alphanumeric': 0.08027210884353742, 'fraction_numerical': 0.04081632653061224, 'mean_word_length': 3.4984709480122325, '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': '3258855', 'n_tokens_mistral': 581, 'n_tokens_neox': 529, 'n_words': 161}