test_bench-bootstrap 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/test_bench/bootstrap.rb +14 -12
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a61e98241c90eeb97185b93f941d689fcc8f9f78c776c490130d5d055adb9f0
|
4
|
+
data.tar.gz: 4810d767fd1dda8c53f2279ef6b0971101dca745c3eb4fab81c0f591b397c245
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8447b2e32eb2950ea87e33a83228dd95d48acdf831539d3ee2afae671405261ee847b5810cd6b15bd0068ab5fcd2ca13787128b583e2da46e20e2dc5ea13f28
|
7
|
+
data.tar.gz: 911dd76a71af1d84a8874790f1abb136ac70ea72df5c29746f487cd0cbf91d272861d0d4e78fd4dc97593ee19dac0891dcca2c4bc7c8a03bfdd6eacb80b0f4dc
|
data/lib/test_bench/bootstrap.rb
CHANGED
@@ -107,14 +107,14 @@ module TestBench
|
|
107
107
|
raise AssertionFailure.build(1)
|
108
108
|
end
|
109
109
|
|
110
|
-
def context(
|
110
|
+
def context(title=nil, &block)
|
111
111
|
if block.nil?
|
112
|
-
Output.write(
|
112
|
+
Output.write(title || 'Context', sgr_code: 0x33)
|
113
113
|
return
|
114
114
|
end
|
115
115
|
|
116
|
-
unless
|
117
|
-
Output.indent(
|
116
|
+
unless title.nil?
|
117
|
+
Output.indent(title, sgr_code: 0x32) do
|
118
118
|
context(&block)
|
119
119
|
end
|
120
120
|
return
|
@@ -122,31 +122,33 @@ module TestBench
|
|
122
122
|
|
123
123
|
block.()
|
124
124
|
end
|
125
|
+
alias_method :context!, :context
|
125
126
|
|
126
|
-
def _context(
|
127
|
-
context(
|
127
|
+
def _context(title=nil, &block)
|
128
|
+
context(title)
|
128
129
|
end
|
129
130
|
|
130
|
-
def test(
|
131
|
+
def test(title=nil, &block)
|
131
132
|
if block.nil?
|
132
|
-
Output.write(
|
133
|
+
Output.write(title || 'Test', sgr_code: 0x33)
|
133
134
|
return
|
134
135
|
end
|
135
136
|
|
136
137
|
begin
|
137
138
|
block.()
|
138
139
|
|
139
|
-
Output.indent(
|
140
|
+
Output.indent(title, sgr_code: 0x32)
|
140
141
|
|
141
142
|
rescue => error
|
142
|
-
Output.indent(
|
143
|
+
Output.indent(title || 'Test', sgr_codes: [0x1, 0x31])
|
143
144
|
|
144
145
|
raise error
|
145
146
|
end
|
146
147
|
end
|
148
|
+
alias_method :test!, :test
|
147
149
|
|
148
|
-
def _test(
|
149
|
-
test(
|
150
|
+
def _test(title=nil, &block)
|
151
|
+
test(title)
|
150
152
|
end
|
151
153
|
|
152
154
|
def comment(text)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_bench-bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Ladd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: nathanladd+github@gmail.com
|
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '0'
|
38
38
|
requirements: []
|
39
|
-
rubygems_version: 3.3.
|
39
|
+
rubygems_version: 3.3.22
|
40
40
|
signing_key:
|
41
41
|
specification_version: 4
|
42
42
|
summary: A minimal test framework for testing TestBench
|