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

class Post < ActiveRecord::Base
  belongs_to :user
  validates_uniqueness_of :title
  validates_presence_of :title
  validates_presence_of :body, :message => 'Seriously...  wtf'
  validates_numericality_of :user_id
end

class User < ActiveRecord::Base
  has_many :posts
  has_many :taggings
  has_many :tags, :through => :taggings
  attr_protected :password
  validates_format_of :email, :with => /\w*@\w*.com/
  validates_length_of :email, :in => 1..100
  validates_inclusion_of :age, :in => 1..100
end

class Tag < ActiveRecord::Base
  has_many :taggings
  has_many :users, :through => :taggings
end

class Tagging < ActiveRecord::Base
	belongs_to :user
	belongs_to :tag
end

class PostTest < Test::Unit::TestCase # :nodoc:
  fixtures :posts

  def test_failure
    flunk
  end
  
  should_belong_to :user
  should_require_unique_attributes :title
  
  should_require_attributes :body, :message => /wtf/
  should_require_attributes :title
  should_only_allow_numeric_values_for :user_id
end

class UserTest < Test::Unit::TestCase # :nodoc:
  fixtures :users
  
  should_have_many :posts
  should_have_many :taggings
  should_have_many :tags, :through => :taggings
  <commit_msg>testing ci<commit_after>require File.join(File.dirname(__FILE__), 'test_helper')

class Post < ActiveRecord::Base
  belongs_to :user
  validates_uniqueness_of :title
  validates_presence_of :title
  validates_presence_of :body, :message => 'Seriously...  wtf'
  validates_numericality_of :user_id
end

class User < ActiveRecord::Base
  has_many :posts
  has_many :taggings
  has_many :tags, :through => :taggings
  attr_protected :password
  validates_format_of :email, :with => /\w*@\w*.com/
  validates_length_of :email, :in => 1..100
  validates_inclusion_of :age, :in => 1..100
end

class Tag < ActiveRecord::Base
  has_many :taggings
  has_many :users, :through => :taggings
end

class Tagging < ActiveRecord::Base
	belongs_to :user
	belongs_to :tag
end

class PostTest < Test::Unit::TestCase # :nodoc:
  fixtures :posts

  should_belong_to :user
  should_require_unique_attributes :title
  
  should_require_attributes :body, :message => /wtf/
  should_require_attributes :title
  should_only_allow_numeric_values_for :user_id
end

class UserTest < Test::Unit::TestCase # :nodoc:
  fixtures :users
  
  should_have_many :posts
  should_have_many :taggings
  should_have_many :tags, :through => :taggings
  
{'fraction_non_alphanumeric': 0.0973630831643002, 'fraction_numerical': 0.006490872210953347, 'mean_word_length': 5.058968058968059, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, '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': '2730926', 'n_tokens_mistral': 885, 'n_tokens_neox': 870, 'n_words': 199}