shard-spectator/spec/spectator/dsl/mocks
Michael Miller fa99987780
Support creating instances of mocked modules via class
This is a bit of a hack.
The `.new` method is added to the module, which creates an instance that includes the mocked module.
No changes to the def_mock and new_mock methods are necessary.

For some reason, infinite recursion occurs when calling `.new` on the class.
To get around the issue for now, the internal method of allocation is used.
That is, allocate + initialize.
2022-12-18 16:04:49 -07:00
..
allow_receive_spec.cr Test behavior and for leakages with allow syntax 2022-10-09 17:14:20 -06:00
double_spec.cr Use before instead of before_each (same for after) 2022-11-04 16:56:03 -06:00
expect_receive_spec.cr Ensure stubs don't leak between examples 2022-10-09 16:59:39 -06:00
have_received_spec.cr Add count modifiers for have_received matcher 2022-07-14 20:46:52 -06:00
lazy_double_spec.cr Test contexts and memoized values 2022-04-02 15:58:08 -06:00
mock_spec.cr Support creating instances of mocked modules via class 2022-12-18 16:04:49 -07:00
null_double_spec.cr Allow passing predefined stubs in as keyword args 2022-03-31 18:55:12 -06:00
stub_spec.cr Add support for any_args in DSL 2022-07-12 19:05:55 -06:00