test_bench 1.2.0.6 → 1.2.0.9
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/cli/parse_arguments.rb +1 -1
- data/lib/test_bench/output/raw.rb +16 -6
- data/lib/test_bench/run.rb +12 -2
- data/lib/test_bench/test_bench.rb +1 -1
- 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: 05441cb83eef17edb08808484675951fdaeedcf33d3b60e77fe7a42d9810d995
|
4
|
+
data.tar.gz: c64e1a00db231505654bf87a9f12329b55de83a72983b581cc2f0a6003f02fd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a00af27a3e6821af9b8fe4116b1be23dba6b8253266d8e17d23c176a4ef936cc64e31ba0b5c58c8cab0021044e0b9a8f9405c0fde30770e27390005179a5ce40
|
7
|
+
data.tar.gz: 114f737345753f230865a4957757409308f3d3d780844a4b1edc9c4d9b8f57f0ec7fcf25315dac8e4011774d8e687edea8741c5272a68427e2d5c724c3fd70f6
|
@@ -66,7 +66,7 @@ TEXT
|
|
66
66
|
env['TEST_BENCH_ABORT_ON_ERROR'] = abort_on_error ? 'on' : 'off'
|
67
67
|
end
|
68
68
|
|
69
|
-
parser.on('-d', '--[no-]detail
|
69
|
+
parser.on('-d', '--[no-]detail', %{Always show (or hide) details (Default: #{Output::Raw::Defaults.detail})}) do |detail|
|
70
70
|
if detail.nil?
|
71
71
|
detail = 'on'
|
72
72
|
elsif detail == true
|
@@ -199,12 +199,22 @@ module TestBench
|
|
199
199
|
|
200
200
|
color = result ? :green : :red
|
201
201
|
|
202
|
-
writer
|
203
|
-
|
204
|
-
|
205
|
-
.
|
206
|
-
|
207
|
-
.
|
202
|
+
writer.indent
|
203
|
+
|
204
|
+
if result
|
205
|
+
writer.escape_code(:green)
|
206
|
+
else
|
207
|
+
writer.escape_code(:bold).escape_code(:red)
|
208
|
+
end
|
209
|
+
|
210
|
+
writer.text(text)
|
211
|
+
|
212
|
+
writer.escape_code(:reset_fg)
|
213
|
+
unless result
|
214
|
+
writer.escape_code(:reset_intensity)
|
215
|
+
end
|
216
|
+
|
217
|
+
writer.newline
|
208
218
|
end
|
209
219
|
|
210
220
|
def skip_test(title)
|
data/lib/test_bench/run.rb
CHANGED
@@ -39,14 +39,24 @@ module TestBench
|
|
39
39
|
instance
|
40
40
|
end
|
41
41
|
|
42
|
-
def self.call(*paths, **args, &block)
|
43
|
-
instance = build(*paths, **args)
|
42
|
+
def self.call(*paths, session: nil, **args, &block)
|
43
|
+
instance = build(*paths, session: session, **args)
|
44
44
|
|
45
45
|
if block.nil?
|
46
46
|
instance.()
|
47
47
|
else
|
48
48
|
instance.() do
|
49
|
+
unless session.nil?
|
50
|
+
original_session = TestBench.session
|
51
|
+
TestBench.session = session
|
52
|
+
end
|
53
|
+
|
49
54
|
block.(instance)
|
55
|
+
|
56
|
+
ensure
|
57
|
+
unless original_session.nil?
|
58
|
+
TestBench.session = original_session
|
59
|
+
end
|
50
60
|
end
|
51
61
|
end
|
52
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_bench
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.0.
|
4
|
+
version: 1.2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Ladd
|
8
8
|
autorequire:
|
9
9
|
bindir: script
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test_bench-fixture
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
|
-
rubygems_version: 3.
|
114
|
+
rubygems_version: 3.3.4
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Principled Test Framework for Ruby and MRuby
|