test-unit-fasterskip 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,11 @@ module Test::Unit
|
|
8
8
|
attribute(:fast_pending, [caller, message], *tests)
|
9
9
|
end
|
10
10
|
|
11
|
+
# Mark remaining tests in class as pending (and don't run setup/teardown)
|
12
|
+
def pend_rest_if(message)
|
13
|
+
attribute(:fast_pending, [caller, message], {:keep => true})
|
14
|
+
end
|
15
|
+
|
11
16
|
# Omit (and don't run setup/teardown) if block evalutes to true.
|
12
17
|
def omit_if(message, *tests, &block)
|
13
18
|
attribute(:fast_omit, [caller, message, block], *tests)
|
@@ -15,7 +20,12 @@ module Test::Unit
|
|
15
20
|
|
16
21
|
# Sugar for omit_if() { not .. }
|
17
22
|
def omit_unless(message, *tests, &block)
|
18
|
-
attribute(:fast_omit, [caller, message, Proc.new { not block.call }], *tests)
|
23
|
+
attribute(:fast_omit, [caller, message, Proc.new { |*args| not block.call(*args) }], *tests)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Omit remaining tests in class (and don't run setup/teardown) if block evalutes to true.
|
27
|
+
def omit_rest_if(message, &block)
|
28
|
+
attribute(:fast_omit, [caller, message, block], {:keep => true})
|
19
29
|
end
|
20
30
|
end
|
21
31
|
|
@@ -14,10 +14,11 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.authors = ["Jørgen P. Tjernø"]
|
15
15
|
s.email = ["jtjerno@mylookout.com"]
|
16
16
|
s.homepage = "https://github.com/jorgenpt/test-unit-fasterskip"
|
17
|
-
s.summary = %q{Add
|
17
|
+
s.summary = %q{Add class-level pend & omit_if/unless that skips setup/teardown}
|
18
18
|
s.description = %q{If you have very heavy-weight setup/teardown methods, this
|
19
|
-
gem allows you to mark tests as pending on a class level. This will
|
20
|
-
calling setup/teardown for that test, but still "pend" it like
|
19
|
+
gem allows you to mark tests as pending or omitted on a class level. This will
|
20
|
+
skip calling setup/teardown for that test, but still "pend"/"omit" it like
|
21
|
+
normal.}
|
21
22
|
|
22
23
|
s.rubyforge_project = "test-unit-fasterskip"
|
23
24
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit-fasterskip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|
16
|
-
requirement: &
|
16
|
+
requirement: &2151861160 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.4.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2151861160
|
25
25
|
description: ! "If you have very heavy-weight setup/teardown methods, this\n gem
|
26
|
-
allows you to mark tests as pending on a class level. This will
|
27
|
-
setup/teardown for that test, but still \"pend\" it like
|
26
|
+
allows you to mark tests as pending or omitted on a class level. This will\n skip
|
27
|
+
calling setup/teardown for that test, but still \"pend\"/\"omit\" it like\n normal."
|
28
28
|
email:
|
29
29
|
- jtjerno@mylookout.com
|
30
30
|
executables: []
|
@@ -59,8 +59,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
61
|
rubyforge_project: test-unit-fasterskip
|
62
|
-
rubygems_version: 1.8.
|
62
|
+
rubygems_version: 1.8.15
|
63
63
|
signing_key:
|
64
64
|
specification_version: 3
|
65
|
-
summary: Add
|
65
|
+
summary: Add class-level pend & omit_if/unless that skips setup/teardown
|
66
66
|
test_files: []
|