kandianying 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +9 -4
- data/Gemfile +0 -2
- data/lib/kandianying/version.rb +1 -1
- data/lib/kandianying/vieshow.rb +2 -1
- data/spec/ambassador_spec.rb +35 -0
- data/spec/fixtures/ambassador_name_38897fa9-094f-4e63-9d6d-c52408438cb6.yml +7 -0
- data/spec/fixtures/ambassador_table_38897fa9-094f-4e63-9d6d-c52408438cb6.yml +68 -0
- data/spec/fixtures/vcr_cassettes/ambassador_name_38897fa9-094f-4e63-9d6d-c52408438cb6.yml +9077 -0
- data/spec/fixtures/vcr_cassettes/ambassador_table_38897fa9-094f-4e63-9d6d-c52408438cb6.yml +9077 -0
- data/spec/vieshow_spec.rb +14 -18
- metadata +11 -1
data/spec/vieshow_spec.rb
CHANGED
@@ -2,32 +2,28 @@ require './spec/support/vcr_setup'
|
|
2
2
|
|
3
3
|
TEST_SITES = %w(05 12)
|
4
4
|
FAIL_SITES = %w(0 16)
|
5
|
+
TEST_INFO = %w(name table)
|
5
6
|
FIXTURES = './spec/fixtures/vieshow_'
|
6
7
|
|
7
8
|
describe 'Get film information' do
|
8
9
|
TEST_SITES.each do |site|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
it "must return same table for #{site}" do
|
18
|
-
VCR.use_cassette("vieshow_table_#{site}") do
|
19
|
-
cinema = HsinChuMovie::Vieshow.new(site.to_i)
|
20
|
-
site_table = yml_load("#{FIXTURES}table_#{site}.yml")
|
21
|
-
site_table.must_equal cinema.movie_table
|
10
|
+
TEST_INFO.each do |t|
|
11
|
+
it "must return same list of movies for #{site}" do
|
12
|
+
VCR.use_cassette("vieshow_#{t}_#{site}") do
|
13
|
+
cinema = HsinChuMovie::Vieshow.new(site.to_i)
|
14
|
+
site_info = yml_load("#{FIXTURES}#{t}_#{site}.yml")
|
15
|
+
compare = t == TEST_INFO[0] ? cinema.movie_names : cinema.movie_table
|
16
|
+
site_info.must_equal compare
|
17
|
+
end
|
22
18
|
end
|
23
19
|
end
|
24
20
|
end
|
25
21
|
end
|
26
22
|
|
27
23
|
describe 'Outside of 1 and 14 must fail' do
|
28
|
-
FAIL_SITES.each do |site|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
24
|
+
# FAIL_SITES.each do |site|
|
25
|
+
# it "must fail for #{site}" do
|
26
|
+
# # HsinChuMovie::Vieshow.new(site.to_i).must_fail
|
27
|
+
# end
|
28
|
+
# end
|
33
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kandianying
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stonegold546
|
@@ -106,6 +106,11 @@ files:
|
|
106
106
|
- lib/kandianying/ambassador.rb
|
107
107
|
- lib/kandianying/version.rb
|
108
108
|
- lib/kandianying/vieshow.rb
|
109
|
+
- spec/ambassador_spec.rb
|
110
|
+
- spec/fixtures/ambassador_name_38897fa9-094f-4e63-9d6d-c52408438cb6.yml
|
111
|
+
- spec/fixtures/ambassador_table_38897fa9-094f-4e63-9d6d-c52408438cb6.yml
|
112
|
+
- spec/fixtures/vcr_cassettes/ambassador_name_38897fa9-094f-4e63-9d6d-c52408438cb6.yml
|
113
|
+
- spec/fixtures/vcr_cassettes/ambassador_table_38897fa9-094f-4e63-9d6d-c52408438cb6.yml
|
109
114
|
- spec/fixtures/vcr_cassettes/vieshow_name_05.yml
|
110
115
|
- spec/fixtures/vcr_cassettes/vieshow_name_12.yml
|
111
116
|
- spec/fixtures/vcr_cassettes/vieshow_table_05.yml
|
@@ -141,6 +146,11 @@ signing_key:
|
|
141
146
|
specification_version: 4
|
142
147
|
summary: Get movie information in Hsin Chu
|
143
148
|
test_files:
|
149
|
+
- spec/ambassador_spec.rb
|
150
|
+
- spec/fixtures/ambassador_name_38897fa9-094f-4e63-9d6d-c52408438cb6.yml
|
151
|
+
- spec/fixtures/ambassador_table_38897fa9-094f-4e63-9d6d-c52408438cb6.yml
|
152
|
+
- spec/fixtures/vcr_cassettes/ambassador_name_38897fa9-094f-4e63-9d6d-c52408438cb6.yml
|
153
|
+
- spec/fixtures/vcr_cassettes/ambassador_table_38897fa9-094f-4e63-9d6d-c52408438cb6.yml
|
144
154
|
- spec/fixtures/vcr_cassettes/vieshow_name_05.yml
|
145
155
|
- spec/fixtures/vcr_cassettes/vieshow_name_12.yml
|
146
156
|
- spec/fixtures/vcr_cassettes/vieshow_table_05.yml
|