sjunkieex 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
data/test/test_interface.rb
CHANGED
@@ -27,6 +27,7 @@ class TestInterface < Test::Unit::TestCase
|
|
27
27
|
|
28
28
|
|
29
29
|
def test_parse_homepage
|
30
|
+
# tests for multiple Episodes: White.Collar.S02E02-S02E14.......
|
30
31
|
filename = File.dirname(__FILE__) + '/site_dumps/homepage.html'
|
31
32
|
interface = Sjunkieex::Interface.new(@series_index, url: filename)
|
32
33
|
|
@@ -41,6 +42,17 @@ class TestInterface < Test::Unit::TestCase
|
|
41
42
|
assert_equal "shameless us", links["http://serienjunkies.org/serie/shameless-us/"]
|
42
43
|
end
|
43
44
|
|
45
|
+
def test_parse_homepage_with_range
|
46
|
+
filename = File.dirname(__FILE__) + '/site_dumps/homepage_with_white_collar.html'
|
47
|
+
interface = Sjunkieex::Interface.new(@series_index, url: filename)
|
48
|
+
|
49
|
+
links = interface.look_for_new_episodes
|
50
|
+
|
51
|
+
assert_equal false, links.empty?
|
52
|
+
|
53
|
+
assert_equal true, links.include?("http://serienjunkies.org/serie/white-collar/")
|
54
|
+
assert_equal "white collar", links["http://serienjunkies.org/serie/white-collar/"]
|
55
|
+
end
|
44
56
|
|
45
57
|
def test_parse_chase_series_page
|
46
58
|
interface = Sjunkieex::Interface.new(@series_index)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sjunkieex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- test/seriesindex_example.xml
|
66
66
|
- test/site_dumps/chase.html
|
67
67
|
- test/site_dumps/homepage.html
|
68
|
+
- test/site_dumps/homepage_with_white_collar.html
|
68
69
|
- test/site_dumps/rizzoli_and_isles.html
|
69
70
|
- test/test_helper.rb
|
70
71
|
- test/test_interface.rb
|
@@ -97,6 +98,7 @@ test_files:
|
|
97
98
|
- test/seriesindex_example.xml
|
98
99
|
- test/site_dumps/chase.html
|
99
100
|
- test/site_dumps/homepage.html
|
101
|
+
- test/site_dumps/homepage_with_white_collar.html
|
100
102
|
- test/site_dumps/rizzoli_and_isles.html
|
101
103
|
- test/test_helper.rb
|
102
104
|
- test/test_interface.rb
|