<commit_before>require "spec_helper"
require 'go_import'

describe "File" do
    let ("file") {
        GoImport::File.new
    }

    it "is valid when it has path, created_by and organization" do
        # given
        file.path = "spec\\sample_data\\offert.docx"
        file.created_by = GoImport::CoworkerReference.new( { :integration_id => "123" } )
        file.organization = GoImport::OrganizationReference.new( { :integration_id => "456" } )

        # when, then
        file.validate.should eq ""
    end

    it "is valid when it has name, path, created_by and deal" do
        # given
        file.name = "Offert"
        file.path = "spec\\sample_data\\offert.docx"
        file.created_by = GoImport::CoworkerReference.new( { :integration_id => "123" } )
        file.deal = GoImport::DealReference.new( { :integration_id => "456" } )

        # when, then
        file.validate.should eq ""
    end
<commit_msg>path fixes for travis tests<commit_after>require "spec_helper"
require 'go_import'

describe "File" do
    let ("file") {
        GoImport::File.new
    }

    it "is valid when it has path, created_by and organization" do
        # given
        file.path = "spec/sample_data/offert.docx"
        file.created_by = GoImport::CoworkerReference.new( { :integration_id => "123" } )
        file.organization = GoImport::OrganizationReference.new( { :integration_id => "456" } )

        # when, then
        file.validate.should eq ""
    end

    it "is valid when it has name, path, created_by and deal" do
        # given
        file.name = "Offert"
        file.path = "spec/sample_data/offert.docx"
        file.created_by = GoImport::CoworkerReference.new( { :integration_id => "123" } )
        file.deal = GoImport::DealReference.new( { :integration_id => "456" } )

        # when, then
        file.validate.should eq ""
    end

{'fraction_non_alphanumeric': 0.1232583065380493, 'fraction_numerical': 0.012861736334405145, 'mean_word_length': 2.5160075329566856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7175020', 'n_tokens_mistral': 623, 'n_tokens_neox': 583, 'n_words': 138}