duct_tape 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -230,178 +230,229 @@ end
230
230
  # Array#map_to_h
231
231
  #
232
232
  describe Array, "#map_to_h" do
233
- it "remains unchanged" do
234
- # TODO
233
+ it "should have the method defined" do
234
+ expect(Array.method_defined?(:map_to_h)).to be(true)
235
235
  end
236
+
237
+ pending "More tests"
236
238
  end
237
239
 
238
240
  #
239
241
  # Array#chunk
240
242
  #
241
243
  describe Array, "#chunk" do
242
- it "remains unchanged" do
243
- # TODO
244
+ it "should have the method defined" do
245
+ expect(Array.method_defined?(:chunk)).to be(true)
244
246
  end
247
+
248
+ pending "More tests"
245
249
  end
246
250
 
247
251
  #
248
252
  # Array#not_empty?
249
253
  #
250
254
  describe Array, "#not_empty?" do
251
- it "remains unchanged" do
252
- # TODO
255
+ it "should have the method defined" do
256
+ expect(Array.method_defined?(:not_empty?)).to be(true)
253
257
  end
258
+
259
+ pending "More tests"
254
260
  end
255
261
 
256
262
  #
257
263
  # Array#sum
258
264
  #
259
265
  describe Array, "#sum" do
260
- it "remains unchanged" do
261
- # TODO
266
+ it "should have the method defined" do
267
+ expect(Array.method_defined?(:sum)).to be(true)
262
268
  end
269
+
270
+ pending "More tests"
263
271
  end
264
272
 
265
273
  #
266
274
  # Array#product
267
275
  #
268
276
  describe Array, "#product" do
269
- it "remains unchanged" do
270
- # TODO
277
+ it "should have the method defined" do
278
+ expect(Array.method_defined?(:product)).to be(true)
271
279
  end
280
+
281
+ pending "More tests"
272
282
  end
273
283
 
274
284
  #
275
285
  # Array#squares
276
286
  #
277
287
  describe Array, "#squares" do
278
- it "remains unchanged" do
279
- # TODO
288
+ it "should have the method defined" do
289
+ expect(Array.method_defined?(:squares)).to be(true)
280
290
  end
291
+
292
+ pending "More tests"
281
293
  end
282
294
 
283
295
  #
284
296
  # Array#ranks
285
297
  #
286
298
  describe Array, "#ranks" do
287
- it "remains unchanged" do
288
- # TODO
299
+ it "should have the method defined" do
300
+ expect(Array.method_defined?(:ranks)).to be(true)
289
301
  end
302
+
303
+ pending "More tests"
290
304
  end
291
305
 
292
306
  #
293
307
  # Array#sqrts
294
308
  #
295
309
  describe Array, "#sqrts" do
296
- it "remains unchanged" do
297
- # TODO
310
+ it "should have the method defined" do
311
+ expect(Array.method_defined?(:sqrts)).to be(true)
298
312
  end
313
+
314
+ pending "More tests"
299
315
  end
300
316
 
301
317
  #
302
318
  # Array#mean
303
319
  #
304
320
  describe Array, "#mean" do
305
- it "remains unchanged" do
306
- # TODO
321
+ it "should have the method defined" do
322
+ expect(Array.method_defined?(:mean)).to be(true)
307
323
  end
324
+
325
+ pending "More tests"
308
326
  end
309
327
 
310
328
  #
311
329
  # Array#frequencies
312
330
  #
313
331
  describe Array, "#frequencies" do
314
- it "remains unchanged" do
315
- # TODO
332
+ it "should have the method defined" do
333
+ expect(Array.method_defined?(:frequencies)).to be(true)
316
334
  end
335
+
336
+ pending "More tests"
317
337
  end
318
338
 
319
339
  #
320
340
  # Array#variance
321
341
  #
322
342
  describe Array, "#variance" do
323
- it "remains unchanged" do
324
- # TODO
343
+ it "should have the method defined" do
344
+ expect(Array.method_defined?(:variance)).to be(true)
325
345
  end
346
+
347
+ pending "More tests"
326
348
  end
327
349
 
328
350
  #
329
351
  # Array#std_dev
330
352
  #
331
353
  describe Array, "#std_dev" do
332
- it "remains unchanged" do
333
- # TODO
354
+ it "should have the method defined" do
355
+ expect(Array.method_defined?(:std_dev)).to be(true)
334
356
  end
357
+
358
+ pending "More tests"
335
359
  end
336
360
 
337
361
  #
338
362
  # Array#median
339
363
  #
340
364
  describe Array, "#median" do
341
- it "remains unchanged" do
342
- # TODO
365
+ it "should have the method defined" do
366
+ expect(Array.method_defined?(:median)).to be(true)
343
367
  end
368
+
369
+ pending "More tests"
344
370
  end
345
371
 
346
372
  #
347
373
  # Array#first_quartile
348
374
  #
349
375
  describe Array, "#first_quartile" do
350
- it "remains unchanged" do
351
- # TODO
376
+ it "should have the method defined" do
377
+ expect(Array.method_defined?(:first_quartile)).to be(true)
352
378
  end
379
+
380
+ pending "More tests"
353
381
  end
354
382
 
355
383
  #
356
384
  # Array#last_quartile
357
385
  #
358
386
  describe Array, "#last_quartile" do
359
- it "remains unchanged" do
360
- # TODO
387
+ it "should have the method defined" do
388
+ expect(Array.method_defined?(:last_quartile)).to be(true)
361
389
  end
390
+
391
+ pending "More tests"
362
392
  end
363
393
 
364
394
  #
365
395
  # Array#quartiles
366
396
  #
367
397
  describe Array, "#quartiles" do
368
- it "remains unchanged" do
369
- # TODO
398
+ it "should have the method defined" do
399
+ expect(Array.method_defined?(:quartiles)).to be(true)
370
400
  end
401
+
402
+ pending "More tests"
371
403
  end
372
404
 
373
405
  #
374
406
  # Array#interquartile_range
375
407
  #
376
408
  describe Array, "#interquartile_range" do
377
- it "remains unchanged" do
378
- # TODO
409
+ it "should have the method defined" do
410
+ expect(Array.method_defined?(:interquartile_range)).to be(true)
379
411
  end
412
+
413
+ pending "More tests"
380
414
  end
381
415
 
382
416
  #
383
417
  # Array#modes
384
418
  #
385
419
  describe Array, "#modes" do
386
- it "remains unchanged" do
387
- # TODO
420
+ it "should have the method defined" do
421
+ expect(Array.method_defined?(:modes)).to be(true)
388
422
  end
423
+
424
+ pending "More tests"
389
425
  end
390
426
 
391
427
  #
392
428
  # Array#midrange
393
429
  #
394
430
  describe Array, "#midrange" do
395
- it "remains unchanged" do
396
- # TODO
431
+ it "should have the method defined" do
432
+ expect(Array.method_defined?(:midrange)).to be(true)
397
433
  end
434
+
435
+ pending "More tests"
398
436
  end
399
437
 
400
438
  #
401
439
  # Array#statistical_range
402
440
  #
403
441
  describe Array, "#statistical_range" do
404
- it "remains unchanged" do
405
- # TODO
442
+ it "should have the method defined" do
443
+ expect(Array.method_defined?(:statistical_range)).to be(true)
406
444
  end
445
+
446
+ pending "More tests"
447
+ end
448
+
449
+ #
450
+ # Array#statistics
451
+ #
452
+ describe Array, "#statistics" do
453
+ it "should have the method defined" do
454
+ expect(Array.method_defined?(:statistics)).to be(true)
455
+ end
456
+
457
+ pending "More tests"
407
458
  end
@@ -4,7 +4,9 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # DateTime#to_time
5
5
  #
6
6
  describe DateTime, "#to_time" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(DateTime.method_defined?(:to_time)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
data/spec/ext/dir_spec.rb CHANGED
@@ -4,43 +4,53 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # Dir.relative_path
5
5
  #
6
6
  describe Dir, ".relative_path" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(Dir.respond_to?(:relative_path)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
11
13
 
12
14
  #
13
15
  # Dir.absolute_path
14
16
  #
15
17
  describe Dir, ".absolute_path" do
16
- it "remains unchanged" do
17
- # TODO
18
+ it "should have the method defined" do
19
+ expect(Dir.respond_to?(:absolute_path)).to be(true)
18
20
  end
21
+
22
+ pending "More tests"
19
23
  end
20
24
 
21
25
  #
22
26
  # Dir.empty?
23
27
  #
24
28
  describe Dir, ".empty?" do
25
- it "remains unchanged" do
26
- # TODO
29
+ it "should have the method defined" do
30
+ expect(Dir.respond_to?(:empty?)).to be(true)
27
31
  end
32
+
33
+ pending "More tests"
28
34
  end
29
35
 
30
36
  #
31
37
  # Dir#children
32
38
  #
33
39
  describe Dir, "#children" do
34
- it "remains unchanged" do
35
- # TODO
40
+ it "should have the method defined" do
41
+ expect(Dir.method_defined?(:children)).to be(true)
36
42
  end
43
+
44
+ pending "More tests"
37
45
  end
38
46
 
39
47
  #
40
48
  # Dir#/
41
49
  #
42
50
  describe Dir, "#/" do
43
- it "remains unchanged" do
44
- # TODO
51
+ it "should have the method defined" do
52
+ expect(Dir.method_defined?(:/)).to be(true)
45
53
  end
54
+
55
+ pending "More tests"
46
56
  end
@@ -1,10 +1,23 @@
1
1
  require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
2
2
 
3
3
  #
4
- # File.classify_file
4
+ # File.relative_path
5
5
  #
6
- describe File, ".classify_file" do
7
- it "remains unchanged" do
8
- # TODO
6
+ describe File, ".relative_path" do
7
+ it "should have the method defined" do
8
+ expect(File.respond_to?(:relative_path)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
12
+ end
13
+
14
+ #
15
+ # File.absolute_path
16
+ #
17
+ describe File, ".absolute_path" do
18
+ it "should have the method defined" do
19
+ expect(File.respond_to?(:absolute_path)).to be(true)
20
+ end
21
+
22
+ pending "More tests"
10
23
  end
@@ -4,70 +4,102 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # Hash#deep_merge
5
5
  #
6
6
  describe Hash, "#deep_merge" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(Hash.method_defined?(:deep_merge)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
11
13
 
12
14
  #
13
15
  # Hash#deep_merge!
14
16
  #
15
17
  describe Hash, "#deep_merge!" do
16
- it "changes" do
17
- # TODO
18
+ it "should have the method defined" do
19
+ expect(Hash.method_defined?(:deep_merge!)).to be(true)
18
20
  end
21
+
22
+ pending "More tests"
19
23
  end
20
24
 
21
25
  #
22
26
  # Hash#chunk
23
27
  #
24
28
  describe Hash, "#chunk" do
25
- it "remains unchanged" do
26
- # TODO
29
+ it "should have the method defined" do
30
+ expect(Hash.method_defined?(:chunk)).to be(true)
27
31
  end
32
+
33
+ pending "More tests"
28
34
  end
29
35
 
30
36
  #
31
37
  # Hash#not_empty?
32
38
  #
33
39
  describe Hash, "#not_empty?" do
34
- it "remains unchanged" do
35
- # TODO
40
+ it "should have the method defined" do
41
+ expect(Hash.method_defined?(:not_empty?)).to be(true)
36
42
  end
43
+
44
+ pending "More tests"
37
45
  end
38
46
 
39
47
  #
40
48
  # Hash#select_keys
41
49
  #
42
50
  describe Hash, "#select_keys" do
43
- it "remains unchanged" do
44
- # TODO
51
+ it "should have the method defined" do
52
+ expect(Hash.method_defined?(:select_keys)).to be(true)
45
53
  end
54
+
55
+ pending "More tests"
46
56
  end
47
57
 
48
58
  #
49
59
  # Hash#select_keys!
50
60
  #
51
61
  describe Hash, "#select_keys!" do
52
- it "changes" do
53
- # TODO
62
+ it "should have the method defined" do
63
+ expect(Hash.method_defined?(:select_keys!)).to be(true)
54
64
  end
65
+
66
+ pending "More tests"
55
67
  end
56
68
 
57
69
  #
58
70
  # Hash#reject_keys
59
71
  #
60
72
  describe Hash, "#reject_keys" do
61
- it "remains unchanged" do
62
- # TODO
73
+ it "should have the method defined" do
74
+ expect(Hash.method_defined?(:reject_keys)).to be(true)
63
75
  end
76
+
77
+ pending "More tests"
64
78
  end
65
79
 
66
80
  #
67
81
  # Hash#reject_keys!
68
82
  #
69
83
  describe Hash, "#reject_keys!" do
70
- it "changes" do
71
- # TODO
84
+ it "should have the method defined" do
85
+ expect(Hash.method_defined?(:reject_keys!)).to be(true)
86
+ end
87
+
88
+ pending "More tests"
89
+ end
90
+
91
+ #
92
+ # Hash#to_h
93
+ #
94
+ describe Hash, "#to_h" do
95
+ it "should have the method defined" do
96
+ expect(Hash.method_defined?(:to_h)).to be(true)
97
+ end
98
+
99
+ it "should not create a new instance" do
100
+ a = {1=>2}
101
+ b = a.to_h
102
+ b[2] = 3
103
+ expect(a).to eq(b)
72
104
  end
73
105
  end
@@ -4,61 +4,185 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # Kernel#this_method
5
5
  #
6
6
  describe Kernel, "#this_method" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(Kernel.private_method_defined?(:this_method)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
11
13
 
12
14
  #
13
15
  # Kernel#calling_method
14
16
  #
15
17
  describe Kernel, "#calling_method" do
16
- it "remains unchanged" do
17
- # TODO
18
+ it "should have the method defined" do
19
+ expect(Kernel.private_method_defined?(:calling_method)).to be(true)
18
20
  end
21
+
22
+ pending "More tests"
23
+ end
24
+
25
+ #
26
+ # Kernel#calling_method_file
27
+ #
28
+ describe Kernel, "#calling_method_file" do
29
+ it "should have the method defined" do
30
+ expect(Kernel.private_method_defined?(:calling_method_file)).to be(true)
31
+ end
32
+
33
+ pending "More tests"
34
+ end
35
+
36
+ #
37
+ # Kernel#calling_method_dirname
38
+ #
39
+ describe Kernel, "#calling_method_dirname" do
40
+ it "should have the method defined" do
41
+ expect(Kernel.private_method_defined?(:calling_method_dirname)).to be(true)
42
+ end
43
+
44
+ pending "More tests"
19
45
  end
20
46
 
21
47
  #
22
48
  # Kernel#tty?
23
49
  #
24
50
  describe Kernel, "#tty?" do
25
- it "remains unchanged" do
26
- # TODO
51
+ it "should have the method defined" do
52
+ expect(Kernel.private_method_defined?(:tty?)).to be(true)
27
53
  end
54
+
55
+ pending "More tests"
28
56
  end
29
57
 
30
58
  #
31
59
  # Kernel#tty_width
32
60
  #
33
61
  describe Kernel, "#tty_width" do
34
- it "remains unchanged" do
35
- # TODO
62
+ it "should have the method defined" do
63
+ expect(Kernel.private_method_defined?(:tty_width)).to be(true)
36
64
  end
65
+
66
+ pending "More tests"
37
67
  end
38
68
 
39
69
  #
40
70
  # Kernel#not_implemented
41
71
  #
42
72
  describe Kernel, "#not_implemented" do
43
- it "remains unchanged" do
44
- # TODO
73
+ it "should have the method defined" do
74
+ expect(Kernel.private_method_defined?(:not_implemented)).to be(true)
45
75
  end
76
+
77
+ pending "More tests"
46
78
  end
47
79
 
48
80
  #
49
81
  # Kernel#automatic_require
50
82
  #
51
83
  describe Kernel, "#automatic_require" do
52
- it "remains unchanged" do
53
- # TODO
84
+ it "should have the method defined" do
85
+ expect(Kernel.private_method_defined?(:automatic_require)).to be(true)
54
86
  end
87
+
88
+ pending "More tests"
55
89
  end
56
90
 
57
91
  #
58
92
  # Kernel#type_assert
59
93
  #
60
94
  describe Kernel, "#type_assert" do
61
- it "remains unchanged" do
62
- # TODO
95
+ it "should have the method defined" do
96
+ expect(Kernel.private_method_defined?(:type_assert)).to be(true)
63
97
  end
98
+
99
+ pending "More tests"
100
+ end
101
+
102
+ #
103
+ # Kernel#detect_os
104
+ #
105
+ describe Kernel, "#detect_os" do
106
+ it "should have the method defined" do
107
+ expect(Kernel.private_method_defined?(:detect_os)).to be(true)
108
+ end
109
+
110
+ pending "More tests"
111
+ end
112
+
113
+ #
114
+ # Kernel#detect_hardware
115
+ #
116
+ describe Kernel, "#detect_hardware" do
117
+ it "should have the method defined" do
118
+ expect(Kernel.private_method_defined?(:detect_hardware)).to be(true)
119
+ end
120
+
121
+ pending "More tests"
122
+ end
123
+
124
+ #
125
+ # Kernel#detect_interpreter
126
+ #
127
+ describe Kernel, "#detect_interpreter" do
128
+ it "should have the method defined" do
129
+ expect(Kernel.private_method_defined?(:detect_interpreter)).to be(true)
130
+ end
131
+
132
+ pending "More tests"
133
+ end
134
+
135
+ #
136
+ # Kernel#detect_interpreter_language
137
+ #
138
+ describe Kernel, "#detect_interpreter_language" do
139
+ it "should have the method defined" do
140
+ expect(Kernel.private_method_defined?(:detect_interpreter_language)).to be(true)
141
+ end
142
+
143
+ pending "More tests"
144
+ end
145
+
146
+ #
147
+ # Kernel#detect_reachable_ip
148
+ #
149
+ describe Kernel, "#detect_reachable_ip" do
150
+ it "should have the method defined" do
151
+ expect(Kernel.private_method_defined?(:detect_reachable_ip)).to be(true)
152
+ end
153
+
154
+ pending "More tests"
155
+ end
156
+
157
+ #
158
+ # Kernel#detect_platform
159
+ #
160
+ describe Kernel, "#detect_platform" do
161
+ it "should have the method defined" do
162
+ expect(Kernel.private_method_defined?(:detect_platform)).to be(true)
163
+ end
164
+
165
+ pending "More tests"
166
+ end
167
+
168
+ #
169
+ # Kernel#required_if_used
170
+ #
171
+ describe Kernel, "#required_if_used" do
172
+ it "should have the method defined" do
173
+ expect(Kernel.private_method_defined?(:required_if_used)).to be(true)
174
+ end
175
+
176
+ pending "More tests"
177
+ end
178
+
179
+ #
180
+ # Kernel#gem_installed?
181
+ #
182
+ describe Kernel, "#gem_installed?" do
183
+ it "should have the method defined" do
184
+ expect(Kernel.private_method_defined?(:gem_installed?)).to be(true)
185
+ end
186
+
187
+ pending "More tests"
64
188
  end