<commit_before>require 'spec_helper'

describe SiteFile do
  it "should be invalid without name or path" do
    SiteFile.new.valid?.should eq(false)
  end
end<commit_msg>add: test uniqueness of site file name<commit_after>require 'spec_helper'

describe SiteFile do
  it "should be invalid without name or path" do
    SiteFile.new.valid?.should eq(false)
  end

  it "name should be unique" do
    SiteFile.create(:name => 'unique', :path => '/foo/bar')
    SiteFile.new(:name => 'unique', :path => '/foo/baz').valid?.should eq(false)
  end
  
  #FIXME: name should be unique only for a single site, but not globally unique
end
{'fraction_non_alphanumeric': 0.10987261146496816, 'fraction_numerical': 0.0, 'mean_word_length': 4.032, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4600203', 'n_tokens_mistral': 200, 'n_tokens_neox': 193, 'n_words': 71}