test_bench-run 2.1.2.8 → 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: 1b2cc15913ee684b608b52f833b17c2a5e490ad65a32a4e3d252fad2947e170e
4
- data.tar.gz: 9d9c540cbc436b3337a76f6ad7da4dd70d2819802e94504e5ea264cde56a86c8
3
+ metadata.gz: 9d4753df150e9879e0a2c8ebad015ca5c4888153b19068a7466edad3dec4fba2
4
+ data.tar.gz: befb5c733d136ae25a9137ccdbb2194e3ca883591f6e3f57f7030b8cdd0b4dbe
5
5
  SHA512:
6
- metadata.gz: 04f2ad79384ad8b59343bb64c9b56ca77697f7161fe5e45efdc1c10e2a0a8a09d6bdd6b0e51eb70074cd079b41c934eba0eb19533f5c3e8b656aa913af3b6e98
7
- data.tar.gz: a034f3e5b4241480ca189724f40c842451b6a2e7d7d59f3d811b95d81824a167b78758dfd4865143a968b025d0b7533455409c8a6841167a4464f29c77985b35
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.8
4
+ version: 2.1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Ladd