sjunkieex 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -49,17 +49,15 @@ class TestInterface < Test::Unit::TestCase
49
49
  assert_equal "Shameless US", links["http://serienjunkies.org/serie/shameless-us/"]
50
50
  end
51
51
 
52
- # def test_parse_homepage_with_range
53
- # filename = File.dirname(__FILE__) + '/site_dumps/homepage_with_white_collar.html'
54
- # interface = Sjunkieex::Interface.new(@series_index, url: filename)
55
-
56
- # links = interface.look_for_new_episodes()
52
+ def test_that_the_right_links_get_extracted_for_a_series
53
+ filename = File.dirname(__FILE__) + '/site_dumps/homepage_with_wrong_links.html'
54
+ interface = Sjunkieex::Interface.new(@series_index, url: filename)
57
55
 
58
- # assert_equal false, links.empty?
56
+ links = interface.look_for_new_episodes
59
57
 
60
- # assert_equal true, links.include?("http://serienjunkies.org/serie/white-collar/")
61
- # assert_equal "White Collar", links["http://serienjunkies.org/serie/white-collar/"]
62
- # end
58
+ assert_equal false, links.include?("http://serienjunkies.org/serie/person-of-interest/")
59
+ assert_equal true, links.include?("http://serienjunkies.org/serie/good-wife/")
60
+ end
63
61
 
64
62
  def test_parse_chase_series_page
65
63
  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.1.2
4
+ version: 0.1.3
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: 2013-01-22 00:00:00.000000000 Z
12
+ date: 2013-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -70,6 +70,7 @@ files:
70
70
  - .gitignore
71
71
  - .travis.yml
72
72
  - Gemfile
73
+ - Guardfile
73
74
  - LICENSE
74
75
  - README.md
75
76
  - Rakefile
@@ -82,6 +83,7 @@ files:
82
83
  - test/site_dumps/chase.html
83
84
  - test/site_dumps/homepage.html
84
85
  - test/site_dumps/homepage_with_white_collar.html
86
+ - test/site_dumps/homepage_with_wrong_links.html
85
87
  - test/site_dumps/rizzoli_and_isles.html
86
88
  - test/site_dumps/the_big_bang_theory.html
87
89
  - test/test_helper.rb
@@ -115,6 +117,7 @@ test_files:
115
117
  - test/site_dumps/chase.html
116
118
  - test/site_dumps/homepage.html
117
119
  - test/site_dumps/homepage_with_white_collar.html
120
+ - test/site_dumps/homepage_with_wrong_links.html
118
121
  - test/site_dumps/rizzoli_and_isles.html
119
122
  - test/site_dumps/the_big_bang_theory.html
120
123
  - test/test_helper.rb