<commit_before>require 'spec_helper'
require 'fileutils'
include FollowDepthCharts

describe TeamSaver do
  test_filename = 'test-teams.txt'

  team = Team.new('Team Actors')
  team.closer = '<NAME>'
  team.next = '<NAME>'
  team.stealth = '<NAME>'
  team.looming = '<NAME>'
  teams = [team]

  context 'when saving teams' do
    it 'should save them with out error' do
      TeamSaver.save(teams, test_filename).should_not raise_error
    end
  end

  context 'when loading teams' do
    it 'should load them with out error' do
      TeamSaver.load(test_filename).should_not raise_error
    end
    it 'should return an array of teams' do
      loaded_teams = TeamSaver.load(test_filename)
      loaded_teams.size.should == 1
    end
    it 'should be not be different before and after saving' do
      loaded_teams = TeamSaver.load(test_filename)
      loaded_team = loaded_teams[0]
      team = teams[0]
      TeamDiff.diff(loaded_team, team).should == {}
    end
  end
  FileUtils.rm(test_filename)
end
<commit_msg>Fixing `TeamSaver` test file name.<commit_after>require 'spec_helper'
require 'fileutils'
include FollowDepthCharts

describe TeamSaver do
  test_filename = 'test-teams.csv'

  team = Team.new('Team Actors')
  team.closer = '<NAME>'
  team.next = '<NAME>'
  team.stealth = '<NAME>'
  team.looming = '<NAME>'
  teams = [team]

  context 'when saving teams' do
    it 'should save them with out error' do
      TeamSaver.save(teams, test_filename).should_not raise_error
    end
  end

  context 'when loading teams' do
    it 'should load them with out error' do
      TeamSaver.load(test_filename).should_not raise_error
    end
    it 'should return an array of teams' do
      loaded_teams = TeamSaver.load(test_filename)
      loaded_teams.size.should == 1
    end
    it 'should be not be different before and after saving' do
      loaded_teams = TeamSaver.load(test_filename)
      loaded_team = loaded_teams[0]
      team = teams[0]
      TeamDiff.diff(loaded_team, team).should == {}
    end
  end
  FileUtils.rm(test_filename)
end

{'fraction_non_alphanumeric': 0.0947061680427392, 'fraction_numerical': 0.0029140359397765905, 'mean_word_length': 3.345991561181435, 'pattern_counts': {'":': 0, '<': 11, '<?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': '2935479', 'n_tokens_mistral': 676, 'n_tokens_neox': 667, 'n_words': 192}