download_tv 2.6.5 → 2.6.7

Sign up to get free protection for your applications and to get access to all the features.
data/test/torrent_test.rb DELETED
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'test_helper'
4
-
5
- describe DownloadTV::Torrent do
6
- grabber_names = DownloadTV::Torrent.new(nil).grabbers
7
- describe 'when creating the object' do
8
- before do
9
- @t = DownloadTV::Torrent.new
10
- end
11
-
12
- it 'will populate the instances' do
13
- _(@t.g_instances.size).must_equal grabber_names.size
14
- end
15
-
16
- it 'will start with all tries available' do
17
- _(@t.tries).must_equal grabber_names.size - 1
18
- end
19
-
20
- it 'will call get_links on its grabber' do
21
- @t.g_instances.first.stub :get_links, %w[test result] do
22
- _(@t.get_links('test show')).must_equal %w[test result]
23
- end
24
- end
25
- end
26
-
27
- describe 'when giving it a default grabber' do
28
- it 'has a default order' do
29
- t = DownloadTV::Torrent.new(nil)
30
- expected = grabber_names.map { |i| "DownloadTV::#{i}" }
31
- _(t.g_instances.map { |i| i.class.name }).must_equal expected
32
- end
33
-
34
- grabber_names.each do |g|
35
- it 'correctly uses the given grabber first' do
36
- t = DownloadTV::Torrent.new(g)
37
- _(t.g_instances.first.class.name).must_equal "DownloadTV::#{g}"
38
- end
39
- end
40
- end
41
- end