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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/test_bench/bootstrap.rb +14 -12
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc965093b2dc0c70333aafb0c18143768a68ab13217930d7860a5e613920622d
4
- data.tar.gz: d949906c02222df28b64b59cfc2e66e77104c673084ab65b0041ecf37772e524
3
+ metadata.gz: 4a61e98241c90eeb97185b93f941d689fcc8f9f78c776c490130d5d055adb9f0
4
+ data.tar.gz: 4810d767fd1dda8c53f2279ef6b0971101dca745c3eb4fab81c0f591b397c245
5
5
  SHA512:
6
- metadata.gz: ce599074b28ff8ec821a3e7b1e2cf613c487730bb030975bb0e1bd6ccea4328fd70a65adc7cef80b81366254479d8368e196926035fee0f8434a85eaad0868d7
7
- data.tar.gz: c20d7770dddc587baa8dd5608aa4469cd69a8512c61586f95d9dbea49c6817cb9347221f0e81a0c9bbd91a81e6fcde04a1132dbd12291e9969fcea21c830a01d
6
+ metadata.gz: b8447b2e32eb2950ea87e33a83228dd95d48acdf831539d3ee2afae671405261ee847b5810cd6b15bd0068ab5fcd2ca13787128b583e2da46e20e2dc5ea13f28
7
+ data.tar.gz: 911dd76a71af1d84a8874790f1abb136ac70ea72df5c29746f487cd0cbf91d272861d0d4e78fd4dc97593ee19dac0891dcca2c4bc7c8a03bfdd6eacb80b0f4dc
@@ -107,14 +107,14 @@ module TestBench
107
107
  raise AssertionFailure.build(1)
108
108
  end
109
109
 
110
- def context(prose=nil, &block)
110
+ def context(title=nil, &block)
111
111
  if block.nil?
112
- Output.write(prose || 'Context', sgr_code: 0x33)
112
+ Output.write(title || 'Context', sgr_code: 0x33)
113
113
  return
114
114
  end
115
115
 
116
- unless prose.nil?
117
- Output.indent(prose, sgr_code: 0x32) do
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(prose=nil, &block)
127
- context(prose)
127
+ def _context(title=nil, &block)
128
+ context(title)
128
129
  end
129
130
 
130
- def test(prose=nil, &block)
131
+ def test(title=nil, &block)
131
132
  if block.nil?
132
- Output.write(prose || 'Test', sgr_code: 0x33)
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(prose, sgr_code: 0x32)
140
+ Output.indent(title, sgr_code: 0x32)
140
141
 
141
142
  rescue => error
142
- Output.indent(prose, sgr_codes: [0x1, 0x31])
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(prose=nil, &block)
149
- test(prose)
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.0.0
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-16 00:00:00.000000000 Z
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.4
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