mlb_gameday 0.2.3.1 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/mlb_gameday.rb +8 -2
- data/lib/mlb_gameday/version.rb +1 -1
- data/resources/data.yml +344 -344
- data/test/api_spec.rb +12 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afb572d47ba8e0600616d659f913fd1b130e706a
|
4
|
+
data.tar.gz: a1a020d170a635355a210c5490965e2129f41f19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b4a14b8ef055db01a778d8b48739b4b612057e2ef12577ade28137181938f5817f1ac9971235b5a5e23ad099e17cae9b193fbaaaf301df37edec38d7d78fc14
|
7
|
+
data.tar.gz: f99acf4627c0f9bf6ad877dbb339fc33fc41bd2a09372d2b2642ac923ce51fc49b3396adb7f96154b2f24e6312794a385c05f4932fa2d2547edea7c2464c831d
|
data/CHANGELOG.md
CHANGED
data/lib/mlb_gameday.rb
CHANGED
@@ -24,9 +24,11 @@ module MLBGameday
|
|
24
24
|
attr_reader :leagues
|
25
25
|
|
26
26
|
def initialize
|
27
|
-
@
|
27
|
+
@data = Psych.load File.open File.join(
|
28
28
|
File.dirname(File.expand_path(__FILE__)), '../resources/data.yml'
|
29
29
|
)
|
30
|
+
|
31
|
+
@leagues = @data[:leagues]
|
30
32
|
end
|
31
33
|
|
32
34
|
def league(name)
|
@@ -43,7 +45,11 @@ module MLBGameday
|
|
43
45
|
|
44
46
|
def teams
|
45
47
|
@teams ||= divisions.map(&:teams).map(&:values).flatten +
|
46
|
-
|
48
|
+
miscellaneous_teams
|
49
|
+
end
|
50
|
+
|
51
|
+
def miscellaneous_teams
|
52
|
+
@data[:miscellaneous_teams].values
|
47
53
|
end
|
48
54
|
|
49
55
|
def division(league, name)
|
data/lib/mlb_gameday/version.rb
CHANGED
data/resources/data.yml
CHANGED
@@ -1,345 +1,345 @@
|
|
1
1
|
---
|
2
|
-
:
|
3
|
-
|
4
|
-
|
5
|
-
:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
:
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
:
|
168
|
-
|
169
|
-
|
170
|
-
:
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
:
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
:
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
:
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
2
|
+
:leagues:
|
3
|
+
:AL: &al !ruby/object:MLBGameday::League
|
4
|
+
name: American
|
5
|
+
divisions:
|
6
|
+
:East: &aleast !ruby/object:MLBGameday::Division
|
7
|
+
name: East
|
8
|
+
league: *al
|
9
|
+
id: 201
|
10
|
+
teams:
|
11
|
+
:BAL: !ruby/object:MLBGameday::Team
|
12
|
+
name: Orioles
|
13
|
+
city: Baltimore
|
14
|
+
league: *al
|
15
|
+
division: *aleast
|
16
|
+
code: BAL
|
17
|
+
file_code: bal
|
18
|
+
id: 110
|
19
|
+
alt_names: [balmlb]
|
20
|
+
:BOS: !ruby/object:MLBGameday::Team
|
21
|
+
name: Red Sox
|
22
|
+
city: Boston
|
23
|
+
league: *al
|
24
|
+
division: *aleast
|
25
|
+
code: BOS
|
26
|
+
file_code: bos
|
27
|
+
id: 111
|
28
|
+
alt_names: [bosox, bosmlb]
|
29
|
+
:NYY: !ruby/object:MLBGameday::Team
|
30
|
+
name: Yankees
|
31
|
+
city: New York
|
32
|
+
league: *al
|
33
|
+
division: *aleast
|
34
|
+
code: NYY
|
35
|
+
file_code: nyy
|
36
|
+
id: 147
|
37
|
+
alt_names:
|
38
|
+
- new york yankee
|
39
|
+
- nyamlb
|
40
|
+
:TB: !ruby/object:MLBGameday::Team
|
41
|
+
name: Rays
|
42
|
+
city: Tampa Bay
|
43
|
+
league: *al
|
44
|
+
division: *aleast
|
45
|
+
code: TB
|
46
|
+
file_code: tb
|
47
|
+
id: 139
|
48
|
+
alt_names:
|
49
|
+
- devil rays
|
50
|
+
- devil ray
|
51
|
+
- tampa
|
52
|
+
- tbamlb
|
53
|
+
:TOR: !ruby/object:MLBGameday::Team
|
54
|
+
name: Blue Jays
|
55
|
+
city: Toronto
|
56
|
+
league: *al
|
57
|
+
division: *aleast
|
58
|
+
code: TOR
|
59
|
+
file_code: tor
|
60
|
+
id: 141
|
61
|
+
alt_names:
|
62
|
+
- bluejay
|
63
|
+
- jays
|
64
|
+
- jay
|
65
|
+
- tormlb
|
66
|
+
:Central: &alcentral !ruby/object:MLBGameday::Division
|
67
|
+
name: Central
|
68
|
+
league: *al
|
69
|
+
id: 202
|
70
|
+
teams:
|
71
|
+
:CLE: !ruby/object:MLBGameday::Team
|
72
|
+
name: Indians
|
73
|
+
city: Cleveland
|
74
|
+
league: *al
|
75
|
+
division: *alcentral
|
76
|
+
code: CLE
|
77
|
+
file_code: cle
|
78
|
+
id: 114
|
79
|
+
:CWS: !ruby/object:MLBGameday::Team
|
80
|
+
name: White Sox
|
81
|
+
city: Chicago
|
82
|
+
league: *al
|
83
|
+
division: *alcentral
|
84
|
+
code: CWS
|
85
|
+
file_code: cws
|
86
|
+
id: 145
|
87
|
+
:DET: !ruby/object:MLBGameday::Team
|
88
|
+
name: Tigers
|
89
|
+
city: Detroit
|
90
|
+
league: *al
|
91
|
+
division: *alcentral
|
92
|
+
code: DET
|
93
|
+
file_code: det
|
94
|
+
id: 116
|
95
|
+
:KC: !ruby/object:MLBGameday::Team
|
96
|
+
name: Royals
|
97
|
+
city: Kansas City
|
98
|
+
league: *al
|
99
|
+
division: *alcentral
|
100
|
+
code: KC
|
101
|
+
file_code: kc
|
102
|
+
id: 118
|
103
|
+
alt_names:
|
104
|
+
- kansas
|
105
|
+
:MIN: !ruby/object:MLBGameday::Team
|
106
|
+
name: Twins
|
107
|
+
city: Minnesota
|
108
|
+
league: *al
|
109
|
+
division: *alcentral
|
110
|
+
code: MIN
|
111
|
+
file_code: min
|
112
|
+
id: 142
|
113
|
+
:West: &alwest !ruby/object:MLBGameday::Division
|
114
|
+
name: West
|
115
|
+
league: *al
|
116
|
+
id: 200
|
117
|
+
teams:
|
118
|
+
:LAA: !ruby/object:MLBGameday::Team
|
119
|
+
name: Angels
|
120
|
+
city: Anaheim
|
121
|
+
league: *al
|
122
|
+
division: *alwest
|
123
|
+
code: LAA
|
124
|
+
file_code: ana
|
125
|
+
id: 108
|
126
|
+
alt_names:
|
127
|
+
- ana
|
128
|
+
- los angeles angel
|
129
|
+
- los angeles angels
|
130
|
+
- la angels
|
131
|
+
- la angel
|
132
|
+
- laaa
|
133
|
+
- los angeles angels of anaheim
|
134
|
+
:HOU: !ruby/object:MLBGameday::Team
|
135
|
+
name: Astros
|
136
|
+
city: Houston
|
137
|
+
league: *al
|
138
|
+
division: *alwest
|
139
|
+
code: HOU
|
140
|
+
file_code: hou
|
141
|
+
id: 117
|
142
|
+
:OAK: !ruby/object:MLBGameday::Team
|
143
|
+
name: Athletics
|
144
|
+
city: Oakland
|
145
|
+
league: *al
|
146
|
+
division: *alwest
|
147
|
+
code: OAK
|
148
|
+
file_code: oak
|
149
|
+
id: 133
|
150
|
+
alt_names:
|
151
|
+
- as
|
152
|
+
:SEA: !ruby/object:MLBGameday::Team
|
153
|
+
name: Mariners
|
154
|
+
city: Seattle
|
155
|
+
league: *al
|
156
|
+
division: *alwest
|
157
|
+
code: SEA
|
158
|
+
file_code: sea
|
159
|
+
id: 136
|
160
|
+
:TEX: !ruby/object:MLBGameday::Team
|
161
|
+
name: Rangers
|
162
|
+
city: Texas
|
163
|
+
league: *al
|
164
|
+
division: *alwest
|
165
|
+
code: TEX
|
166
|
+
file_code: tex
|
167
|
+
id: 140
|
168
|
+
:NL: &nl !ruby/object:MLBGameday::League
|
169
|
+
name: National
|
170
|
+
divisions:
|
171
|
+
:East: &nleast !ruby/object:MLBGameday::Division
|
172
|
+
name: East
|
173
|
+
league: *nl
|
174
|
+
id: 204
|
175
|
+
teams:
|
176
|
+
:ATL: !ruby/object:MLBGameday::Team
|
177
|
+
name: Braves
|
178
|
+
city: Atlanta
|
179
|
+
league: *nl
|
180
|
+
division: *nleast
|
181
|
+
code: ATL
|
182
|
+
file_code: atl
|
183
|
+
id: 144
|
184
|
+
:MIA: !ruby/object:MLBGameday::Team
|
185
|
+
name: Marlins
|
186
|
+
city: Miami
|
187
|
+
league: *nl
|
188
|
+
division: *nleast
|
189
|
+
code: MIA
|
190
|
+
file_code: mia
|
191
|
+
id: 146
|
192
|
+
alt_names:
|
193
|
+
- florida
|
194
|
+
:NYM: !ruby/object:MLBGameday::Team
|
195
|
+
name: Mets
|
196
|
+
city: New York
|
197
|
+
league: *nl
|
198
|
+
division: *nleast
|
199
|
+
code: NYM
|
200
|
+
file_code: nym
|
201
|
+
id: 121
|
202
|
+
alt_names:
|
203
|
+
- new york met
|
204
|
+
:PHI: !ruby/object:MLBGameday::Team
|
205
|
+
name: Phillies
|
206
|
+
city: Philadelphia
|
207
|
+
league: *nl
|
208
|
+
division: *nleast
|
209
|
+
code: PHI
|
210
|
+
file_code: phi
|
211
|
+
id: 143
|
212
|
+
alt_names:
|
213
|
+
- philly
|
214
|
+
:WSH: !ruby/object:MLBGameday::Team
|
215
|
+
name: Nationals
|
216
|
+
city: Washington
|
217
|
+
league: *nl
|
218
|
+
division: *nleast
|
219
|
+
code: WSH
|
220
|
+
file_code: was
|
221
|
+
id: 120
|
222
|
+
alt_names:
|
223
|
+
- natinals
|
224
|
+
:Central: &nlcentral !ruby/object:MLBGameday::Division
|
225
|
+
name: Central
|
226
|
+
league: *nl
|
227
|
+
id: 205
|
228
|
+
teams:
|
229
|
+
:CHC: !ruby/object:MLBGameday::Team
|
230
|
+
name: Cubs
|
231
|
+
city: Chicago
|
232
|
+
league: *nl
|
233
|
+
division: *nlcentral
|
234
|
+
code: CHC
|
235
|
+
file_code: chc
|
236
|
+
id: 112
|
237
|
+
alt_names:
|
238
|
+
- chicago cub
|
239
|
+
:CIN: !ruby/object:MLBGameday::Team
|
240
|
+
name: Reds
|
241
|
+
city: Cincinnati
|
242
|
+
league: *nl
|
243
|
+
division: *nlcentral
|
244
|
+
code: CIN
|
245
|
+
file_code: cin
|
246
|
+
id: 113
|
247
|
+
:MIL: !ruby/object:MLBGameday::Team
|
248
|
+
name: Brewers
|
249
|
+
city: Milwaukee
|
250
|
+
league: *nl
|
251
|
+
division: *nlcentral
|
252
|
+
code: MIL
|
253
|
+
file_code: mil
|
254
|
+
id: 158
|
255
|
+
:PIT: !ruby/object:MLBGameday::Team
|
256
|
+
name: Pirates
|
257
|
+
city: Pittsburgh
|
258
|
+
league: *nl
|
259
|
+
division: *nlcentral
|
260
|
+
code: PIT
|
261
|
+
file_code: pit
|
262
|
+
id: 134
|
263
|
+
alt_names:
|
264
|
+
- buccos
|
265
|
+
- bucco
|
266
|
+
:STL: !ruby/object:MLBGameday::Team
|
267
|
+
name: Cardinals
|
268
|
+
city: St. Louis
|
269
|
+
league: *nl
|
270
|
+
division: *nlcentral
|
271
|
+
code: STL
|
272
|
+
file_code: stl
|
273
|
+
id: 138
|
274
|
+
alt_names:
|
275
|
+
- st louis
|
276
|
+
:West: &nlwest !ruby/object:MLBGameday::Division
|
277
|
+
name: West
|
278
|
+
league: *nl
|
279
|
+
id: 203
|
280
|
+
teams:
|
281
|
+
:ARI: !ruby/object:MLBGameday::Team
|
282
|
+
name: Diamondbacks
|
283
|
+
city: Arizona
|
284
|
+
league: *nl
|
285
|
+
division: *nlwest
|
286
|
+
code: ARI
|
287
|
+
file_code: ari
|
288
|
+
id: 109
|
289
|
+
alt_names:
|
290
|
+
- dbacks
|
291
|
+
- dback
|
292
|
+
- az
|
293
|
+
- "d-backs"
|
294
|
+
:COL: !ruby/object:MLBGameday::Team
|
295
|
+
name: Rockies
|
296
|
+
city: Colorado
|
297
|
+
league: *nl
|
298
|
+
division: *nlwest
|
299
|
+
code: COL
|
300
|
+
file_code: col
|
301
|
+
id: 115
|
302
|
+
:LAD: !ruby/object:MLBGameday::Team
|
303
|
+
name: Dodgers
|
304
|
+
city: Los Angeles
|
305
|
+
league: *nl
|
306
|
+
division: *nlwest
|
307
|
+
code: LAD
|
308
|
+
file_code: la
|
309
|
+
id: 119
|
310
|
+
alt_names:
|
311
|
+
- la
|
312
|
+
- los angeles dodgers
|
313
|
+
- los angeles dodger
|
314
|
+
- la dodger
|
315
|
+
- la dodgers
|
316
|
+
:SD: !ruby/object:MLBGameday::Team
|
317
|
+
name: Padres
|
318
|
+
city: San Diego
|
319
|
+
league: *nl
|
320
|
+
division: *nlwest
|
321
|
+
code: SD
|
322
|
+
file_code: sd
|
323
|
+
id: 135
|
324
|
+
:SF: !ruby/object:MLBGameday::Team
|
325
|
+
name: Giants
|
326
|
+
city: San Francisco
|
327
|
+
league: *nl
|
328
|
+
division: *nlwest
|
329
|
+
code: SF
|
330
|
+
file_code: sf
|
331
|
+
id: 137
|
332
|
+
alt_names:
|
333
|
+
- san fran
|
334
|
+
- gigantes
|
335
|
+
:miscellaneous_teams:
|
336
|
+
:AAS: !ruby/object:MLBGameday::Team
|
337
|
+
name: AL All Stars
|
338
|
+
city: AL
|
339
|
+
code: AL
|
340
|
+
file_code: aas
|
341
|
+
:NAS: !ruby/object:MLBGameday::Team
|
342
|
+
name: NL All Stars
|
343
|
+
city: NL
|
344
|
+
code: NL
|
345
|
+
file_code: nas
|
data/test/api_spec.rb
CHANGED
@@ -13,23 +13,23 @@ class TestApi < MiniTest::Test
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def test_league_count
|
16
|
-
assert_equal @api.leagues.count
|
16
|
+
assert_equal 2, @api.leagues.count
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_division_count
|
20
|
-
assert_equal @api.divisions.count
|
20
|
+
assert_equal 6, @api.divisions.count
|
21
21
|
end
|
22
22
|
|
23
23
|
def test_team_count
|
24
|
-
assert_equal @api.teams.count
|
24
|
+
assert_equal 32, @api.teams.count
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_initial_search
|
28
|
-
assert_equal @api.team('LAD').city
|
28
|
+
assert_equal 'Los Angeles', @api.team('LAD').city
|
29
29
|
end
|
30
30
|
|
31
31
|
def test_name_search
|
32
|
-
assert_equal @api.team('Dodgers').city
|
32
|
+
assert_equal 'Los Angeles', @api.team('Dodgers').city
|
33
33
|
end
|
34
34
|
|
35
35
|
def test_name_search_for_nonexistent_returns_nil
|
@@ -37,12 +37,12 @@ class TestApi < MiniTest::Test
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def test_division_team_count
|
40
|
-
assert_equal @api.team('Dodgers').division.teams.count
|
40
|
+
assert_equal 5, @api.team('Dodgers').division.teams.count
|
41
41
|
end
|
42
42
|
|
43
43
|
def test_astros_in_al_west
|
44
|
-
assert_equal @api.team('Astros').league.name
|
45
|
-
assert_equal @api.team('Astros').division.name
|
44
|
+
assert_equal 'American', @api.team('Astros').league.name
|
45
|
+
assert_equal 'West', @api.team('Astros').division.name
|
46
46
|
end
|
47
47
|
|
48
48
|
def test_names_includes_code
|
@@ -104,4 +104,8 @@ class TestApi < MiniTest::Test
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
107
|
+
|
108
|
+
def test_all_star_teams
|
109
|
+
assert_equal 2, @api.teams.select { |t| t.name['All Stars'] }.length
|
110
|
+
end
|
107
111
|
end
|