Sha256: e6fc9f6ba167ee9977f307188aadb357fdb626e045f1b095e21dbe64b8db826d

Contents?: true

Size: 723 Bytes

Versions: 5

Compression:

Stored size: 723 Bytes

Contents

require 'spec_helper'
require 'torrent_client'
describe VideoTorrentInfo::TorrentClient do
  let(:target) { 'RIPD.3D.2013.BDRip1080p.halfOU(Killbrain)_[scarabey.org].mkv' }
  subject { VideoTorrentInfo::TorrentClient.new }
  context 'when #load' do
    context 'with wrong file' do
      specify do
        expect { subject.load('abra', 0, 1000000, 'cadabra', 8661, 8662) }.to raise_error('failed to load torrent info: No such file or directory')
      end
    end
    context 'with good file' do
      before do
        File.unlink(target)
        subject.load('spec/fixtures/test.torrent', 0, 1000000, './', 8661, 8662)
      end
      specify do
        expect(File.exist?(target)).to be_true
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
video-torrent-info-0.1.4 spec/lib/torrent_client_spec.rb
video-torrent-info-0.1.3 spec/lib/torrent_client_spec.rb
video-torrent-info-0.1.2 spec/lib/torrent_client_spec.rb
video-torrent-info-0.1.1 spec/lib/torrent_client_spec.rb
video-torrent-info-0.1.0 spec/lib/torrent_client_spec.rb