test_bench 1.2.0.8 → 1.2.0.10

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.rb +12 -2
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75966d6cf6ce67d117c91e82985d8d68edde7017b8c342ee923d565af1ecb966
4
- data.tar.gz: d5078aaddeea8ce9e293f9ba025358400a92cb4383d2318f85edb2cb4eaa635a
3
+ metadata.gz: bf623714bd1a7e461fd2519de2a0315efc6823674ad4bb66d91057fed3feb504
4
+ data.tar.gz: e501647a1755496cf9b6fd17c56c068094adf617b8090bea51c869741997d671
5
5
  SHA512:
6
- metadata.gz: 7a0b95384cadb14e19d923b70a793014aeb3d5ac783681d7ef1d3693170e85de43969bf2b8c74f3a1e90eb06bb8f2d2563fe3bf666b5ce8986fd45814f403b47
7
- data.tar.gz: a03c1257cbdee5aeb048f12dedeca28e16078062d712c9552791ab06b020f09b690962aab9699df2d77a2e148103a57c073340b8cbebab09b0dc95071a110ddb
6
+ metadata.gz: 22baa0a0872e4030083134355946e890b0c663c9bb4e3026020f77e9e1e1e179f9e61ee499e8cedc8db90a4ee020f9025dc74f67addda27f820109420f2a3339
7
+ data.tar.gz: c4b93134a82c2e2a381aec39e9fdc03fbccc905e98066f0b965cdfe343f483466accff6c7cb99cc461c168e447a488ac03127d057078daf1bb85e7aabb86873b
@@ -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,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.8
4
+ version: 1.2.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Ladd
8
8
  autorequire:
9
9
  bindir: script
10
10
  cert_chain: []
11
- date: 2021-05-18 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test_bench-fixture
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.0
19
+ version: 1.4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0.0
26
+ version: 1.4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: test_bench-bootstrap
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -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.1.6
114
+ rubygems_version: 3.4.10
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Principled Test Framework for Ruby and MRuby