test_bench-bootstrap 4.1.1 → 6.0.0
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.
- checksums.yaml +4 -4
- data/lib/test_bench/bootstrap.rb +30 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bab482f0b0e6c9bd91cafe2eda531743d77bb46c67bc9ace7cc3d0b5d29048e
|
4
|
+
data.tar.gz: 39f9bc31bd52f88621e13a6df81fd8f709ba62366aa4dbfd82acbba4d823324f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a365bd710e401b38b945b92f22c2aeb23929bd4dd4a1b3a43cb8a3138209816fa9f74076b04ef05f48112bd7855ee34dcd0e7e66106234a2982212b16a91da44
|
7
|
+
data.tar.gz: 915db1d6c535c5663d677300ae4b1bde08087fb49b659efd0a565cc063e8cbf0c6683a48ae7580f67ac2fb9f48f85750cacf2050bbddc78b13a7542ec3e82293
|
data/lib/test_bench/bootstrap.rb
CHANGED
@@ -151,16 +151,39 @@ module TestBench
|
|
151
151
|
test(title)
|
152
152
|
end
|
153
153
|
|
154
|
-
def comment(
|
155
|
-
Output.
|
154
|
+
def comment(comment)
|
155
|
+
Output.indent(comment)
|
156
|
+
end
|
157
|
+
|
158
|
+
def detail(detail, *additional_details, quote: nil, heading: nil)
|
159
|
+
details = [detail, *additional_details]
|
156
160
|
|
157
|
-
|
158
|
-
|
161
|
+
if quote.nil?
|
162
|
+
quote = details.last.end_with?("\n")
|
159
163
|
end
|
160
|
-
end
|
161
164
|
|
162
|
-
|
163
|
-
|
165
|
+
if quote
|
166
|
+
if heading.nil?
|
167
|
+
heading = !detail.end_with?("\n")
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
if heading
|
172
|
+
heading_text = details.shift
|
173
|
+
Output.indent(heading_text, sgr_codes: [0x1, 0x4])
|
174
|
+
end
|
175
|
+
|
176
|
+
details.each do |detail|
|
177
|
+
if quote
|
178
|
+
detail.each_line do |line|
|
179
|
+
line.chomp!
|
180
|
+
|
181
|
+
Output.indent("\e[2m>\e[22m \e[3m#{line}\e[0m")
|
182
|
+
end
|
183
|
+
else
|
184
|
+
Output.comment(detail)
|
185
|
+
end
|
186
|
+
end
|
164
187
|
end
|
165
188
|
|
166
189
|
def fixture(cls, *args, **kwargs, &block)
|