test_bench-bootstrap 7.0.0 → 7.0.1
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/upstream-lib/test_bench_bootstrap/test_bench/fixture/fixture.rb +7 -4
- data/upstream-lib/test_bench_bootstrap/test_bench/session/session.rb +20 -19
- data/upstream-lib/test_bench_bootstrap/test_bench/session/substitute.rb +12 -0
- data/upstream-lib/test_bench_bootstrap/test_bench/test_bench.rb +4 -0
- 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: 3f087797e1a30457e627a843f823e8b5fddbd1dacaeef4848496498c4e9b028b
|
4
|
+
data.tar.gz: 912ce4dbed032e4bcd26cf1bcf946bea2e71419238aef22107a1382710a22575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b08dfe19230cf4046d319a2e51e770120c33c26aa9ab12fabd4e652f7caabbe2b4c708331b8664ec7b6d5a10f7f66043337ff2f2baac44530df4ce998c51682
|
7
|
+
data.tar.gz: e8a7cd2466d56651c4a2f74a2bd114d70a33e5ff1dd09db3a5c1960d1cf9b3f58521762bc827a472b0d7266495dee79a4fe3f34eec61ddb140aaa9d7cafb89dc
|
@@ -118,6 +118,13 @@ module TestBenchBootstrap
|
|
118
118
|
return text, disposition
|
119
119
|
end
|
120
120
|
|
121
|
+
## Remove when no longer in use - Nathan, Tue Jul 15 2025
|
122
|
+
def self.output(fixture)
|
123
|
+
test_session = fixture.test_session
|
124
|
+
|
125
|
+
Output::Get.(test_session)
|
126
|
+
end
|
127
|
+
|
121
128
|
def comment(heading_text=nil, text_or_fixture, style: nil, disposition: nil)
|
122
129
|
if not heading_text.nil?
|
123
130
|
heading_style = Output::CommentStyle.heading
|
@@ -195,10 +202,6 @@ module TestBenchBootstrap
|
|
195
202
|
end
|
196
203
|
end
|
197
204
|
|
198
|
-
def execute(file_path)
|
199
|
-
test_session.execute(file_path)
|
200
|
-
end
|
201
|
-
|
202
205
|
def fixture(fixture_class, *, test_session: nil, **, &)
|
203
206
|
test_session ||= self.test_session
|
204
207
|
|
@@ -5,6 +5,9 @@ module TestBenchBootstrap
|
|
5
5
|
|
6
6
|
ExecutionBreak = Object.new
|
7
7
|
|
8
|
+
## Remove when no longer in use - Nathan, Tue Jul 15 2025
|
9
|
+
Abort = ExecutionBreak
|
10
|
+
|
8
11
|
def telemetry
|
9
12
|
@telemetry ||= Telemetry::Substitute.build
|
10
13
|
end
|
@@ -202,34 +205,32 @@ module TestBenchBootstrap
|
|
202
205
|
|
203
206
|
catch(ExecutionBreak) do
|
204
207
|
block.(self)
|
205
|
-
end
|
206
208
|
|
207
|
-
|
208
|
-
|
209
|
-
|
209
|
+
rescue Failure => failure
|
210
|
+
message = failure.message
|
211
|
+
record_event(Events::Failed.build(message))
|
210
212
|
|
211
|
-
|
212
|
-
|
213
|
+
rescue ::Exception => exception
|
214
|
+
aborted_recorded = status.error_sequence > previous_status.error_sequence
|
213
215
|
|
214
|
-
|
215
|
-
|
216
|
+
if not aborted_recorded
|
217
|
+
location = format_backtrace.(exception)
|
216
218
|
|
217
|
-
|
218
|
-
|
219
|
-
record_event(Events::Aborted.build(message, location))
|
220
|
-
end
|
219
|
+
message = exception.detailed_message
|
221
220
|
|
222
|
-
|
221
|
+
record_event(Events::Aborted.build(message, location))
|
222
|
+
end
|
223
223
|
|
224
|
-
|
225
|
-
result = status.result(previous_status, pending_event)
|
224
|
+
raise exception
|
226
225
|
|
227
|
-
|
228
|
-
|
226
|
+
ensure
|
227
|
+
result = status.result(previous_status, pending_event)
|
229
228
|
|
230
|
-
|
231
|
-
|
229
|
+
pending_event.result = result
|
230
|
+
record_event(pending_event)
|
232
231
|
end
|
232
|
+
|
233
|
+
result
|
233
234
|
end
|
234
235
|
end
|
235
236
|
end
|
@@ -131,6 +131,18 @@ module TestBenchBootstrap
|
|
131
131
|
RUBY
|
132
132
|
end
|
133
133
|
|
134
|
+
alias :test? :any_test_started_event?
|
135
|
+
alias :one_test? :one_test_started_event?
|
136
|
+
|
137
|
+
alias :context? :any_context_started_event?
|
138
|
+
alias :one_context? :one_context_started_event?
|
139
|
+
|
140
|
+
alias :comment? :any_commented_event?
|
141
|
+
alias :one_comment? :one_commented_event?
|
142
|
+
|
143
|
+
alias :detail? :any_detailed_event?
|
144
|
+
alias :one_detail? :one_detailed_event?
|
145
|
+
|
134
146
|
def one_event?(...)
|
135
147
|
sink.one_event?(...)
|
136
148
|
end
|