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.
- checksums.yaml +4 -4
- data/lib/test_bench/run.rb +12 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf623714bd1a7e461fd2519de2a0315efc6823674ad4bb66d91057fed3feb504
|
4
|
+
data.tar.gz: e501647a1755496cf9b6fd17c56c068094adf617b8090bea51c869741997d671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22baa0a0872e4030083134355946e890b0c663c9bb4e3026020f77e9e1e1e179f9e61ee499e8cedc8db90a4ee020f9025dc74f67addda27f820109420f2a3339
|
7
|
+
data.tar.gz: c4b93134a82c2e2a381aec39e9fdc03fbccc905e98066f0b965cdfe343f483466accff6c7cb99cc461c168e447a488ac03127d057078daf1bb85e7aabb86873b
|
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,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.
|
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:
|
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.
|
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.
|
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.
|
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
|