test_bench-fixture 1.3.1.0 → 1.3.1.1
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/fixture/fixture.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d3be2a7cebd18fa06326859f2169a44e6a8974af8c32033669bbd95aacc827b
|
4
|
+
data.tar.gz: 36784decf899b9f0432da060ce1133d4e426a45830ce6adaf92c7c82e405f4d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9d28986ecc5bd4c76efd955b7dcc6923289dbe8430fa849ba20e5340805dead1f0a1f3ed7813dd403041fbf3decb2bd2dcd27d72e195a3690cdf84d4abf4eed
|
7
|
+
data.tar.gz: 8d52b899330892b3e021ce3c275dc51573ea6c02995c704bab40d5698da21a5e934ab42e1ea81afdeb14b213dd19e295e9061901a2d2201173050d1c6b1679be
|
@@ -37,7 +37,11 @@ module TestBench
|
|
37
37
|
def self.call(cls, *args, **kwargs, &block)
|
38
38
|
factory_method = factory_method(cls)
|
39
39
|
|
40
|
-
|
40
|
+
if factory_method.name == :new
|
41
|
+
last_parameter_type, _ = cls.instance_method(:initialize).parameters.last
|
42
|
+
else
|
43
|
+
last_parameter_type, _ = factory_method.parameters.last
|
44
|
+
end
|
41
45
|
|
42
46
|
if last_parameter_type == :block
|
43
47
|
instance = build(cls, *args, **kwargs, &block)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_bench-fixture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.1.
|
4
|
+
version: 1.3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Ladd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test_bench-bootstrap
|