test_bench-run 2.1.2.9 → 2.1.3.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/run/run.rb +11 -9
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fad39d99e0fb6b5cc40da7ad388d24615242a620ad498692afc2726c8dcc8045
4
- data.tar.gz: f69caf5f4d5d63b145feb8056e72b7963bb5bcd994a37371f74368edef1d8a5c
3
+ metadata.gz: 9d4753df150e9879e0a2c8ebad015ca5c4888153b19068a7466edad3dec4fba2
4
+ data.tar.gz: befb5c733d136ae25a9137ccdbb2194e3ca883591f6e3f57f7030b8cdd0b4dbe
5
5
  SHA512:
6
- metadata.gz: 7ea0a215535d6288ba045edf6541ec0def401f03ebba2e4ef0521317acad844323e0ca41703eeb975772dee9fc0983998d30cf9d735014b467c9cbef38015d9f
7
- data.tar.gz: 991141f0ec78295525458d7dd94dbc64dd8070407d16535d8a9f73ff878d2784d301ba18d8ddd873f0569aba71e49f9a4c3b38919ac3df228ae2b3f97f6d43d7
6
+ metadata.gz: a4700ce607afe9df504e1bfa54a3de2524963ceb011e36f99a97addfbd3cbac4f8962e21f627a66797a0c86d9422bff9f011646ef87392c202b1a7f644c075f2
7
+ data.tar.gz: 83c376aee7d476c49dbe274e12abec579c881cc977beb3e97eb2a776a28c9a93147562d28117750f7fe9214d588e8be6e9ae103910778f138b0d4dbdb7461ccf
@@ -34,7 +34,7 @@ module TestBench
34
34
  end
35
35
  attr_writer :path_sequence
36
36
 
37
- def self.build(exclude: nil)
37
+ def self.build(exclude: nil, session: nil)
38
38
  instance = new
39
39
 
40
40
  GetFiles.configure(instance, exclude:)
@@ -43,14 +43,16 @@ module TestBench
43
43
 
44
44
  Random.configure(instance)
45
45
 
46
- session = Session.build do |telemetry|
47
- Output::File.register(telemetry)
48
- Output::Summary::Error.register(telemetry)
49
- Output::Summary.register(telemetry)
50
-
51
- instance.telemetry = telemetry
46
+ if session.nil?
47
+ session = Session.build do |telemetry|
48
+ Output::File.register(telemetry)
49
+ Output::Summary::Error.register(telemetry)
50
+ Output::Summary.register(telemetry)
51
+ end
52
52
  end
53
53
 
54
+ instance.telemetry = session.telemetry
55
+
54
56
  Session.configure(instance, session:)
55
57
 
56
58
  instance
@@ -66,10 +68,10 @@ module TestBench
66
68
  instance.(path)
67
69
  end
68
70
 
69
- def self.configure(receiver, exclude: nil, attr_name: nil)
71
+ def self.configure(receiver, exclude: nil, session: nil, attr_name: nil)
70
72
  attr_name ||= :run
71
73
 
72
- instance = build(exclude:)
74
+ instance = build(exclude:, session:)
73
75
  receiver.public_send(:"#{attr_name}=", instance)
74
76
  end
75
77
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench-run
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2.9
4
+ version: 2.1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Ladd