tap-test 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History +2 -2
- data/lib/tap/test/unit.rb +16 -13
- data/lib/tap/test/version.rb +4 -4
- metadata +15 -8
data/History
CHANGED
data/lib/tap/test/unit.rb
CHANGED
@@ -41,35 +41,38 @@ else
|
|
41
41
|
# tricky than in the Mini::Test Test::Unit.
|
42
42
|
class Test::Unit::TestCase
|
43
43
|
class << self
|
44
|
+
alias tap_original_test_case_inherited inherited
|
45
|
+
|
46
|
+
def inherited(child)
|
47
|
+
super
|
48
|
+
tap_original_test_case_inherited(child)
|
49
|
+
child.instance_variable_set(:@skip_messages, [])
|
50
|
+
child.instance_variable_set(:@run_test_suite, true)
|
51
|
+
end
|
52
|
+
|
44
53
|
# Causes a test suite to be skipped. If a message is given, it will
|
45
54
|
# print and notify the user the test suite has been skipped.
|
46
55
|
def skip_test(msg=nil)
|
47
|
-
@
|
48
|
-
skip_messages << msg
|
56
|
+
@run_test_suite = false
|
57
|
+
@skip_messages << msg
|
49
58
|
end
|
50
|
-
|
59
|
+
|
51
60
|
alias :original_suite :suite
|
52
61
|
|
53
62
|
# Modifies the default suite method to skip the suit unless
|
54
63
|
# run_test_suite is true. If the test is skipped, the skip_messages
|
55
64
|
# will be printed along with the default 'Skipping <Test>' message.
|
56
65
|
def suite # :nodoc:
|
57
|
-
if
|
58
|
-
|
66
|
+
if @run_test_suite
|
67
|
+
original_suite
|
68
|
+
else
|
69
|
+
skip_message = @skip_messages.compact.join(', ')
|
59
70
|
puts "Skipping #{name}#{skip_message.empty? ? '' : ': ' + skip_message}"
|
60
71
|
|
61
72
|
# return an empty test suite of the appropriate name
|
62
73
|
Test::Unit::TestSuite.new(name)
|
63
|
-
else
|
64
|
-
original_suite
|
65
74
|
end
|
66
75
|
end
|
67
|
-
|
68
|
-
protected
|
69
|
-
|
70
|
-
def skip_messages # :nodoc:
|
71
|
-
@skip_messages ||= []
|
72
|
-
end
|
73
76
|
end
|
74
77
|
end
|
75
78
|
|
data/lib/tap/test/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tap-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 3
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
8
|
+
- 7
|
9
|
+
- 0
|
10
|
+
version: 0.7.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Simon Chiang
|
@@ -14,21 +15,23 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2011-01-09 00:00:00 -07:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: tap
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
|
-
- -
|
27
|
+
- - ~>
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 7
|
27
30
|
segments:
|
28
31
|
- 1
|
29
|
-
-
|
32
|
+
- 4
|
30
33
|
- 0
|
31
|
-
version: 1.
|
34
|
+
version: 1.4.0
|
32
35
|
type: :runtime
|
33
36
|
version_requirements: *id001
|
34
37
|
description:
|
@@ -73,23 +76,27 @@ rdoc_options:
|
|
73
76
|
require_paths:
|
74
77
|
- lib
|
75
78
|
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
76
80
|
requirements:
|
77
81
|
- - ">="
|
78
82
|
- !ruby/object:Gem::Version
|
83
|
+
hash: 3
|
79
84
|
segments:
|
80
85
|
- 0
|
81
86
|
version: "0"
|
82
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
83
89
|
requirements:
|
84
90
|
- - ">="
|
85
91
|
- !ruby/object:Gem::Version
|
92
|
+
hash: 3
|
86
93
|
segments:
|
87
94
|
- 0
|
88
95
|
version: "0"
|
89
96
|
requirements: []
|
90
97
|
|
91
98
|
rubyforge_project: tap
|
92
|
-
rubygems_version: 1.3.
|
99
|
+
rubygems_version: 1.3.7
|
93
100
|
signing_key:
|
94
101
|
specification_version: 3
|
95
102
|
summary: Test modules for Tap
|