<commit_before>require 'minitest/autorun'
require 'fasttrack'

require 'fileutils'
require 'tmpdir'

describe Fasttrack::File do
  before do
    @test_data  = File.join(__FILE__,"..","data","avchd.xmp")
    @test_image = File.join(__FILE__,"..","data","image.jpg")

    @tmpdir = Dir.mktmpdir
    Dir.chdir @tmpdir
  end

  it "should be able to create a new file object" do
    Fasttrack::File.new(@test_data).must_be_kind_of Fasttrack::File
  end

  it "should raise when created with a file that doesn't exist" do
    lambda do<commit_msg>Expand paths in File tests<commit_after>require 'minitest/autorun'
require 'fasttrack'

require 'fileutils'
require 'tmpdir'

describe Fasttrack::File do
  before do
    @test_data  = File.expand_path File.join(__FILE__,"..","data","avchd.xmp")
    @test_image = File.expand_path File.join(__FILE__,"..","data","image.jpg")

    @tmpdir = Dir.mktmpdir
    Dir.chdir @tmpdir
  end

  it "should be able to create a new file object" do
    Fasttrack::File.new(@test_data).must_be_kind_of Fasttrack::File
  end

  it "should raise when created with a file that doesn't exist" do
    lambda do
{'fraction_non_alphanumeric': 0.12024756852343059, 'fraction_numerical': 0.0, 'mean_word_length': 4.168949771689498, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1501193', 'n_tokens_mistral': 392, 'n_tokens_neox': 382, 'n_words': 105}