spotlite 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -25,7 +25,8 @@ IMDB_SAMPLES = {
25
25
  "http://www.imdb.com/find?q=the+core&s=all" => "search_the_core",
26
26
  "http://www.imdb.com/find?q=wappadoozle+swambling&s=all" => "search_no_results",
27
27
  "http://www.imdb.com/chart/top" => "top",
28
- "http://www.imdb.com/movies-in-theaters/" => "movies_in_theaters"
28
+ "http://www.imdb.com/movies-in-theaters/" => "movies_in_theaters",
29
+ "http://www.imdb.com/movies-coming-soon/" => "movies_coming_soon",
29
30
  }
30
31
 
31
32
  unless ENV['LIVE_TEST']
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Spotlite::ComingSoon" do
4
+ before(:each) do
5
+ @list = Spotlite::ComingSoon.new.movies
6
+ end
7
+
8
+ it "should return a few results" do
9
+ @list.size.should be_within(14).of(15)
10
+ end
11
+
12
+ it "should return Spotlite::Movie objects" do
13
+ @list.each { |movie| movie.should be_a(Spotlite::Movie) }
14
+ end
15
+
16
+ describe "Movie" do
17
+ it "should have IMDb ID" do
18
+ @list.each { |movie| movie.imdb_id.should match(/\d{7}/) }
19
+ end
20
+
21
+ it "should have title" do
22
+ @list.each { |movie| movie.title.should match(/\w+/) }
23
+ end
24
+
25
+ it "should have year" do
26
+ @list.each { |movie| movie.year.to_s.should match(/\d{4}/) }
27
+ end
28
+ end
29
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Pakk
@@ -42,14 +42,14 @@ dependencies:
42
42
  name: fakeweb
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Spotlite gem helps you fetch all kinds of publicly available information
@@ -69,6 +69,7 @@ files:
69
69
  - Rakefile
70
70
  - lib/spotlite.rb
71
71
  - lib/spotlite/box_office_top.rb
72
+ - lib/spotlite/coming_soon.rb
72
73
  - lib/spotlite/in_theaters.rb
73
74
  - lib/spotlite/list.rb
74
75
  - lib/spotlite/movie.rb
@@ -77,6 +78,7 @@ files:
77
78
  - lib/spotlite/string_extensions.rb
78
79
  - lib/spotlite/top.rb
79
80
  - lib/spotlite/version.rb
81
+ - spec/fixtures/movies_coming_soon
80
82
  - spec/fixtures/movies_in_theaters
81
83
  - spec/fixtures/search_no_results
82
84
  - spec/fixtures/search_the_core
@@ -94,6 +96,7 @@ files:
94
96
  - spec/fixtures/tt1134629/fullcredits
95
97
  - spec/spec_helper.rb
96
98
  - spec/spotlite/box_office_top_spec.rb
99
+ - spec/spotlite/coming_soon_spec.rb
97
100
  - spec/spotlite/movie_spec.rb
98
101
  - spec/spotlite/opening_this_week_spec.rb
99
102
  - spec/spotlite/search_spec.rb
@@ -109,21 +112,22 @@ require_paths:
109
112
  - lib
110
113
  required_ruby_version: !ruby/object:Gem::Requirement
111
114
  requirements:
112
- - - ! '>='
115
+ - - '>='
113
116
  - !ruby/object:Gem::Version
114
117
  version: '0'
115
118
  required_rubygems_version: !ruby/object:Gem::Requirement
116
119
  requirements:
117
- - - ! '>='
120
+ - - '>='
118
121
  - !ruby/object:Gem::Version
119
122
  version: '0'
120
123
  requirements: []
121
124
  rubyforge_project:
122
- rubygems_version: 2.0.3
125
+ rubygems_version: 2.0.0
123
126
  signing_key:
124
127
  specification_version: 4
125
128
  summary: Ruby gem to fetch publicly available information about movies from IMDb
126
129
  test_files:
130
+ - spec/fixtures/movies_coming_soon
127
131
  - spec/fixtures/movies_in_theaters
128
132
  - spec/fixtures/search_no_results
129
133
  - spec/fixtures/search_the_core
@@ -141,6 +145,7 @@ test_files:
141
145
  - spec/fixtures/tt1134629/fullcredits
142
146
  - spec/spec_helper.rb
143
147
  - spec/spotlite/box_office_top_spec.rb
148
+ - spec/spotlite/coming_soon_spec.rb
144
149
  - spec/spotlite/movie_spec.rb
145
150
  - spec/spotlite/opening_this_week_spec.rb
146
151
  - spec/spotlite/search_spec.rb