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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1646c13fe187bfe974852ada39082f6c6c156ed07bb973ffd20a11bec89afeb8
4
- data.tar.gz: 13e67e83debb64b591e41162ee430f85b7a78ebea43d9d1d07020fcefbacd168
3
+ metadata.gz: 1d3be2a7cebd18fa06326859f2169a44e6a8974af8c32033669bbd95aacc827b
4
+ data.tar.gz: 36784decf899b9f0432da060ce1133d4e426a45830ce6adaf92c7c82e405f4d2
5
5
  SHA512:
6
- metadata.gz: 31f6de1bcb03d338e53e0c0c55e26546f4d82bca0fd7a019419a8f5a6ed188070d00d900ba99b20611cb6256a03351670894860dad744f1800817b9c9154ce47
7
- data.tar.gz: 6863a84298362604a007ffaa9bd9f3b682afdeac8c27fca1a4765fb0451aa084eb642124a9c164d31d08f82f7ae50dcb1e9e71cd1504ffd983fefef551b4a2b4
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
- last_parameter_type, _ = factory_method.parameters.last
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.0
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-03 00:00:00.000000000 Z
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