shard-spectator/spec/spectator/mocks
Michael Miller 4dfa5ccb6e
Prevent defining stubs on undefined methods in LazyDouble
In Crystal 1.6, a segfault would occur in the spec spec/spectator/mocks/lazy_double_spec.cr:238
I suspect this is a Crystal bug of some kind, but can't reduce it.
The methods produced by `method_missing` don't have a return type including Symbol.
Symbol is excluded from the union of return types (Int32 | String | Nil).
The program segfaults when calling a method on the actual value, which is a symbol.
It ultimately crashes when producing a failure message, which indicates the value it tested doesn't equal the expected value (a symbol of the same value).
Avoid this issue by preventing stubs on undefined/untyped methods.
2022-10-08 14:04:02 -06:00
..
allow_spec.cr Test Allow 2022-04-02 12:07:39 -06:00
arguments_spec.cr Rename Arguments.empty to Arguments.none 2022-07-12 18:59:23 -06:00
double_spec.cr Don't return nil for methods using NoReturn 2022-07-13 12:24:29 -06:00
exception_stub_spec.cr Add ExceptionStub 2022-07-09 22:12:24 -06:00
lazy_double_spec.cr Prevent defining stubs on undefined methods in LazyDouble 2022-10-08 14:04:02 -06:00
method_call_spec.cr Document and test MethodCall 2022-03-05 16:15:42 -07:00
mock_spec.cr Don't return nil for methods using NoReturn 2022-07-13 12:24:29 -06:00
multi_value_stub_spec.cr Add ExceptionStub 2022-07-09 22:12:24 -06:00
null_double_spec.cr Disallow stubs for undefined methods in null double 2022-07-14 13:37:09 -06:00
null_stub_spec.cr Add ExceptionStub 2022-07-09 22:12:24 -06:00
proc_stub_spec.cr Address Ameba issue 2022-07-10 17:59:49 -06:00
reference_mock_registry_spec.cr Record calls on injected mocks 2022-06-28 23:36:24 -06:00
value_mock_registry_spec.cr Record calls on injected mocks 2022-06-28 23:36:24 -06:00
value_stub_spec.cr Add ExceptionStub 2022-07-09 22:12:24 -06:00