<commit_before>require 'bundler/setup'
Bundler.require(:test)

require 'minitest/spec'
require 'minitest/autorun'
require 'minitest/pride'
require 'mocha/setup'

DataMapper.setup(:default, { :adapter => :in_memory })

require 'dm-is-voteable'

class TestModel
  include DataMapper::Resource

  property :id, Serial

  is_voteable
end

DataMapper.finalize<commit_msg>Test with a proc.<commit_after>require 'bundler/setup'
Bundler.require(:test)

require 'minitest/spec'
require 'minitest/autorun'
require 'minitest/pride'
require 'mocha/setup'
require 'date'

DataMapper.setup(:default, { :adapter => :in_memory })

require 'dm-is-voteable'

class TestModel
  include DataMapper::Resource

  property :id, Serial

  is_voteable(time_between_votes: ->{ Date.today - 3 })
end

DataMapper.finalize
{'fraction_non_alphanumeric': 0.1210592686002522, 'fraction_numerical': 0.0012610340479192938, 'mean_word_length': 5.786324786324786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '3699606', 'n_tokens_mistral': 283, 'n_tokens_neox': 276, 'n_words': 58}