Sha256: 6963f039dbf1d815893654c8a5d9a838970284ff29bd550e835a87e015cac1a7
Contents?: true
Size: 1.36 KB
Versions: 5
Compression:
Stored size: 1.36 KB
Contents
# encoding: UTF-8 require File.dirname(__FILE__) + '/test_helper.rb' require 'fileutils' class TestInformationStore < Test::Unit::TestCase @@files = { 'chuckfull' => 'Chuck.S01E01.Dies.ist.ein.Test.German.Dubbed.BLURAYRiP.DELiCiOUS.WEBRiP.CiD.avi', 'royal' => 'Royal.Pains.S02E10.Beziehungsbeschwerden.GERMAN.DUBBED.DVDRiP.XviD-SOF.avi', 'flpo' => 'Flashpoint.S04E04.Getruebte.Erinnerungen.German.Dubbed.WEB-DL.XViD.avi', 'legaltrash' =>'flpo.404.Die.German.Erinnerungen.German.Dubbed.WEB-DL.XViD.avi', } def setup TestHelper.create_test_files(@@files.values) TestHelper.cwd @episodes = Hash.new storage = Serienrenamer::InformationStore.new("storage.yml") @@files.each do |key, value| filenametxt = File.new(value, "w") filenametxt.write(value) filenametxt.close episode = Serienrenamer::Episode.new(value) episode.rename @episodes[key] = episode storage.store(episode) end storage.write end def teardown TestHelper.clean end def test_information_storage storage = Serienrenamer::InformationStore.new("storage.yml") @episodes.each do |key, episode| assert_equal(storage.episode_hash[episode.md5sum], episode.series) end end end
Version data entries
5 entries across 5 versions & 1 rubygems