Commit 74a4bf9
Cache ClientStub instances per name like real clients
When disabled, client_for now caches the ClientStub per name instead
of returning a new instance each call. This ensures the same object is
returned on repeated calls, which is needed for test expectations
(e.g. Rspamd.outbound_client.expects(:check)).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 757f84f commit 74a4bf9
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
0 commit comments