<commit_before>require_relative 'support/helper'
require_relative '../lib/hatch'

class CommonStuff
  include Hatch

  attributes :present, :positive

  certifies :present, :presence
  certifies :positive, :positive_number
end

class CommonValidationsTest < Test::Unit::TestCase
  def test_presence
    common_stuff = CommonStuff.hatch(present: nil, positive: 1)
    assert common_stuff.is_a?(CommonStuff::InvalidCommonStuff)
    assert common_stuff.errors.include?("must be present")
  end

  def test_positive_number
    common_stuff = CommonStuff.hatch(present: "here", positive: -1)
    assert common_stuff.is_a?(CommonStuff::InvalidCommonStuff)
    assert common_stuff.errors.include?("must be positive")
  end
end<commit_msg>Wrong expectation. Tired, should not be coding.<commit_after>require_relative 'support/helper'
require_relative '../lib/hatch'

class CommonStuff
  include Hatch

  attributes :present, :positive

  certifies :present, :presence
  certifies :positive, :positive_number
end

class CommonValidationsTest < Test::Unit::TestCase
  def test_presence
    common_stuff = CommonStuff.hatch(present: nil, positive: 1)
    assert common_stuff.is_a?(CommonStuff::InvalidCommonStuff)
    assert common_stuff.errors.include?("must be present")
  end

  def test_positive_number
    common_stuff = CommonStuff.hatch(present: "here", positive: -1)
    assert common_stuff.is_a?(CommonStuff::InvalidCommonStuff)
    assert common_stuff.errors.include?("must be a positive number")
  end
end
{'fraction_non_alphanumeric': 0.09368770764119601, 'fraction_numerical': 0.0026578073089701, 'mean_word_length': 5.463519313304721, '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': '6415727', 'n_tokens_mistral': 481, 'n_tokens_neox': 456, 'n_words': 107}