minitest 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +2 -0
- data/History.txt +13 -0
- data/lib/minitest/unit.rb +32 -12
- metadata +32 -25
- metadata.gz.sig +2 -0
data.tar.gz.sig
ADDED
data/History.txt
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
=== 2.0.1 / 2010-12-15
|
2
|
+
|
3
|
+
* 4 minor enhancements:
|
4
|
+
|
5
|
+
* Do not filter backtrace if $DEBUG
|
6
|
+
* Exit autorun via nested at_exit handler, in case other libs call exit
|
7
|
+
* Make options accesor lazy.
|
8
|
+
* Split printing of test name and its time. (nurse)
|
9
|
+
|
10
|
+
* 1 bug fix:
|
11
|
+
|
12
|
+
* Fix bug when ^T is hit before runner start
|
13
|
+
|
1
14
|
=== 2.0.0 / 2010-11-11
|
2
15
|
|
3
16
|
* 3 major enhancements:
|
data/lib/minitest/unit.rb
CHANGED
@@ -37,13 +37,19 @@ module MiniTest
|
|
37
37
|
return ["No backtrace"] unless bt
|
38
38
|
|
39
39
|
new_bt = []
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
|
41
|
+
unless $DEBUG then
|
42
|
+
bt.each do |line|
|
43
|
+
break if line.rindex MINI_DIR, 0
|
44
|
+
new_bt << line
|
45
|
+
end
|
46
|
+
|
47
|
+
new_bt = bt.reject { |line| line.rindex MINI_DIR, 0 } if new_bt.empty?
|
48
|
+
new_bt = bt.dup if new_bt.empty?
|
49
|
+
else
|
50
|
+
new_bt = bt.dup
|
43
51
|
end
|
44
52
|
|
45
|
-
new_bt = bt.reject { |line| line.rindex MINI_DIR, 0 } if new_bt.empty?
|
46
|
-
new_bt = bt.dup if new_bt.empty?
|
47
53
|
new_bt
|
48
54
|
end
|
49
55
|
|
@@ -508,14 +514,18 @@ module MiniTest
|
|
508
514
|
end
|
509
515
|
|
510
516
|
class Unit
|
511
|
-
VERSION = "2.0.
|
517
|
+
VERSION = "2.0.1" # :nodoc:
|
512
518
|
|
513
519
|
attr_accessor :report, :failures, :errors, :skips # :nodoc:
|
514
520
|
attr_accessor :test_count, :assertion_count # :nodoc:
|
515
521
|
attr_accessor :start_time # :nodoc:
|
516
|
-
attr_accessor :options # :nodoc:
|
517
522
|
attr_accessor :help # :nodoc:
|
518
523
|
attr_accessor :verbose # :nodoc:
|
524
|
+
attr_writer :options # :nodoc:
|
525
|
+
|
526
|
+
def options
|
527
|
+
@options ||= {}
|
528
|
+
end
|
519
529
|
|
520
530
|
@@installed_at_exit ||= false
|
521
531
|
@@out = $stdout
|
@@ -536,8 +546,16 @@ module MiniTest
|
|
536
546
|
def self.autorun
|
537
547
|
at_exit {
|
538
548
|
next if $! # don't run if there was an exception
|
549
|
+
|
550
|
+
# the order here is important. The at_exit handler must be
|
551
|
+
# installed before anyone else gets a chance to install their
|
552
|
+
# own, that way we can be assured that our exit will be last
|
553
|
+
# to run (at_exit stacks).
|
554
|
+
exit_code = nil
|
555
|
+
|
556
|
+
at_exit { exit false if exit_code && exit_code != 0 }
|
557
|
+
|
539
558
|
exit_code = MiniTest::Unit.new.run ARGV
|
540
|
-
exit false if exit_code && exit_code != 0
|
541
559
|
} unless @@installed_at_exit
|
542
560
|
@@installed_at_exit = true
|
543
561
|
end
|
@@ -640,11 +658,13 @@ module MiniTest
|
|
640
658
|
inst = suite.new method
|
641
659
|
inst._assertions = 0
|
642
660
|
|
643
|
-
|
661
|
+
print "#{suite}##{method} = " if @verbose
|
662
|
+
|
663
|
+
@start_time = Time.now
|
644
664
|
result = inst.run self
|
645
|
-
time = Time.now - start_time
|
665
|
+
time = Time.now - @start_time
|
646
666
|
|
647
|
-
print "
|
667
|
+
print "%.2f s = " % time if @verbose
|
648
668
|
print result
|
649
669
|
puts if @verbose
|
650
670
|
|
@@ -785,7 +805,7 @@ module MiniTest
|
|
785
805
|
|
786
806
|
def run runner
|
787
807
|
trap "INFO" do
|
788
|
-
time = Time.now - runner.start_time
|
808
|
+
time = runner.start_time ? Time.now - runner.start_time : 0
|
789
809
|
warn "%s#%s %.2fs" % [self.class, self.__name__, time]
|
790
810
|
runner.status $stderr
|
791
811
|
end if SUPPORTS_INFO_SIGNAL
|
metadata
CHANGED
@@ -5,20 +5,41 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 2.0.
|
8
|
+
- 1
|
9
|
+
version: 2.0.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ryan Davis
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
|
-
cert_chain:
|
15
|
+
cert_chain:
|
16
|
+
- |
|
17
|
+
-----BEGIN CERTIFICATE-----
|
18
|
+
MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
|
19
|
+
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
20
|
+
GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
|
21
|
+
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
22
|
+
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
23
|
+
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
24
|
+
taCPaLmfYIaFcHHCSY4hYDJijRQkLxPeB3xbOfzfLoBDbjvx5JxgJxUjmGa7xhcT
|
25
|
+
oOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh
|
26
|
+
GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
|
27
|
+
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
28
|
+
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
29
|
+
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
|
30
|
+
AQAY59gYvDxqSqgC92nAP9P8dnGgfZgLxP237xS6XxFGJSghdz/nI6pusfCWKM8m
|
31
|
+
vzjjH2wUMSSf3tNudQ3rCGLf2epkcU13/rguI88wO6MrE0wi4ZqLQX+eZQFskJb/
|
32
|
+
w6x9W1ur8eR01s397LSMexySDBrJOh34cm2AlfKr/jokKCTwcM0OvVZnAutaovC0
|
33
|
+
l1SVZ0ecg88bsWHA0Yhh7NFxK1utWoIhtB6AFC/+trM0FQEB/jZkIS8SaNzn96Rl
|
34
|
+
n0sZEf77FLf5peR8TP/PtmIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
|
35
|
+
FBHgymkyj/AOSqKRIpXPhjC6
|
36
|
+
-----END CERTIFICATE-----
|
16
37
|
|
17
|
-
date: 2010-
|
38
|
+
date: 2010-12-15 00:00:00 -08:00
|
18
39
|
default_executable:
|
19
40
|
dependencies:
|
20
41
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
42
|
+
name: minitest
|
22
43
|
prerelease: false
|
23
44
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
45
|
requirements:
|
@@ -27,38 +48,24 @@ dependencies:
|
|
27
48
|
segments:
|
28
49
|
- 2
|
29
50
|
- 0
|
30
|
-
- 4
|
31
|
-
version: 2.0.4
|
32
|
-
type: :development
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: minitest
|
36
|
-
prerelease: false
|
37
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
segments:
|
42
|
-
- 1
|
43
|
-
- 6
|
44
51
|
- 0
|
45
|
-
version:
|
52
|
+
version: 2.0.0
|
46
53
|
type: :development
|
47
|
-
version_requirements: *
|
54
|
+
version_requirements: *id001
|
48
55
|
- !ruby/object:Gem::Dependency
|
49
56
|
name: hoe
|
50
57
|
prerelease: false
|
51
|
-
requirement: &
|
58
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
52
59
|
requirements:
|
53
60
|
- - ">="
|
54
61
|
- !ruby/object:Gem::Version
|
55
62
|
segments:
|
56
63
|
- 2
|
57
|
-
-
|
64
|
+
- 8
|
58
65
|
- 0
|
59
|
-
version: 2.
|
66
|
+
version: 2.8.0
|
60
67
|
type: :development
|
61
|
-
version_requirements: *
|
68
|
+
version_requirements: *id002
|
62
69
|
description: |-
|
63
70
|
minitest provides a complete suite of testing facilities supporting
|
64
71
|
TDD, BDD, mocking, and benchmarking.
|
metadata.gz.sig
ADDED