<commit_before>require 'testing_env'
require 'test/testball'

class FormulaTests < Test::Unit::TestCase
  include VersionAssertions

  def test_prefix
    f = TestBall.new
    assert_equal File.expand_path(f.prefix), (HOMEBREW_CELLAR+f.name+'0.1').to_s
    assert_kind_of Pathname, f.prefix
  end

  def test_installed?
    f = TestBall.new
    f.stubs(:installed_prefix).returns(stub(:directory? => false))
    assert !f.installed?<commit_msg>Simplify prefix test<commit_after>require 'testing_env'
require 'test/testball'

class FormulaTests < Test::Unit::TestCase
  include VersionAssertions

  def test_prefix
    f = TestBall.new
    assert_equal HOMEBREW_CELLAR/f.name/'0.1', f.prefix
    assert_kind_of Pathname, f.prefix
  end

  def test_installed?
    f = TestBall.new
    f.stubs(:installed_prefix).returns(stub(:directory? => false))
    assert !f.installed?
{'fraction_non_alphanumeric': 0.10804597701149425, 'fraction_numerical': 0.004597701149425287, 'mean_word_length': 4.477987421383648, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5379101', 'n_tokens_mistral': 305, 'n_tokens_neox': 288, 'n_words': 57}