<commit_before>$:.unshift File.join(File.dirname(__FILE__),'..','lib')

require 'test/unit'
require 'user'

class UserTest < Test::Unit::TestCase
  def test_initialize
    user = User.new '<EMAIL>'
    assert_equal '<EMAIL>', user.jid
    assert_equal [], user.paths
  end

  def test_add
    user = User.new '<EMAIL>'
    # Should return itself
    assert_equal user, user << '/project'
    # Should have added to paths
    assert_equal ['/project'], user.paths
  end

  def test_delete
    user = User.new '<EMAIL>'
    user.paths = %w( /foo /bar )
    user.delete '/bar'
    assert_equal ['/foo'], user.paths
  end
end<commit_msg>Move user creation into setup.<commit_after>$:.unshift File.join(File.dirname(__FILE__),'..','lib')

require 'test/unit'
require 'user'

class UserTest < Test::Unit::TestCase
  attr_reader :user

  def setup
    @user = User.new '<EMAIL>'
  end

  def test_initialize
    assert_equal '<EMAIL>', user.jid
    assert_equal [], user.paths
  end

  def test_add
    # Should return itself
    assert_equal user, user << '/project'
    # Should have added to paths
    assert_equal ['/project'], user.paths
  end

  def test_delete
    user.paths = %w( /foo /bar )
    user.delete '/bar'
    assert_equal ['/foo'], user.paths
  end
end
{'fraction_non_alphanumeric': 0.13686708860759494, 'fraction_numerical': 0.0, 'mean_word_length': 3.174917491749175, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 9, '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': '6298357', 'n_tokens_mistral': 420, 'n_tokens_neox': 415, 'n_words': 116}