rubysl-test-unit 1.0.1 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/lib/rubysl/test/unit/unit.rb +863 -267
- data/lib/rubysl/test/unit/version.rb +1 -1
- data/lib/test/unit/assertions.rb +281 -531
- data/lib/test/unit/parallel.rb +184 -0
- data/lib/test/unit/testcase.rb +17 -143
- data/rubysl-test-unit.gemspec +3 -1
- metadata +22 -39
- data/lib/test/unit/assertionfailederror.rb +0 -14
- data/lib/test/unit/autorunner.rb +0 -220
- data/lib/test/unit/collector.rb +0 -43
- data/lib/test/unit/collector/dir.rb +0 -107
- data/lib/test/unit/collector/objectspace.rb +0 -34
- data/lib/test/unit/error.rb +0 -56
- data/lib/test/unit/failure.rb +0 -51
- data/lib/test/unit/testresult.rb +0 -80
- data/lib/test/unit/testsuite.rb +0 -76
- data/lib/test/unit/ui/console/testrunner.rb +0 -127
- data/lib/test/unit/ui/fox/testrunner.rb +0 -268
- data/lib/test/unit/ui/gtk/testrunner.rb +0 -416
- data/lib/test/unit/ui/gtk2/testrunner.rb +0 -465
- data/lib/test/unit/ui/testrunnermediator.rb +0 -68
- data/lib/test/unit/ui/testrunnerutilities.rb +0 -46
- data/lib/test/unit/ui/tk/testrunner.rb +0 -260
- data/lib/test/unit/util/backtracefilter.rb +0 -40
- data/lib/test/unit/util/observable.rb +0 -90
- data/lib/test/unit/util/procwrapper.rb +0 -48
@@ -1,48 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
#
|
3
|
-
# Author:: Nathaniel Talbott.
|
4
|
-
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
|
5
|
-
# License:: Ruby license.
|
6
|
-
|
7
|
-
module Test
|
8
|
-
module Unit
|
9
|
-
module Util
|
10
|
-
|
11
|
-
# Allows the storage of a Proc passed through '&' in a
|
12
|
-
# hash.
|
13
|
-
#
|
14
|
-
# Note: this may be inefficient, since the hash being
|
15
|
-
# used is not necessarily very good. In Observable,
|
16
|
-
# efficiency is not too important, since the hash is
|
17
|
-
# only accessed when adding and removing listeners,
|
18
|
-
# not when notifying.
|
19
|
-
|
20
|
-
class ProcWrapper
|
21
|
-
|
22
|
-
# Creates a new wrapper for a_proc.
|
23
|
-
def initialize(a_proc)
|
24
|
-
@a_proc = a_proc
|
25
|
-
@hash = a_proc.inspect.sub(/^(#<#{a_proc.class}:)/){''}.sub(/(>)$/){''}.hex
|
26
|
-
end
|
27
|
-
|
28
|
-
def hash
|
29
|
-
return @hash
|
30
|
-
end
|
31
|
-
|
32
|
-
def ==(other)
|
33
|
-
case(other)
|
34
|
-
when ProcWrapper
|
35
|
-
return @a_proc == other.to_proc
|
36
|
-
else
|
37
|
-
return super
|
38
|
-
end
|
39
|
-
end
|
40
|
-
alias :eql? :==
|
41
|
-
|
42
|
-
def to_proc
|
43
|
-
return @a_proc
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|