1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
# Releases
## v0.35.0
- Add `Sus::Fixtures::TemporaryDirectoryContext`.
## v0.34.0
- Allow `expect(...).to receive(...)` to accept one or more calls (at least once).
## v0.33.0
- Add support for `agent-context` gem.
### `receive` now supports blocks and `and_raise`.
The `receive` predicate has been enhanced to support blocks and the `and_raise` method, allowing for more flexible mocking of method calls.
``` ruby
# `receive` with a block:
expect(interface).to receive(:implementation){10}
# `and_return` with a block:
expect(interface).to receive(:implementation).and_return{FakeImplementation.new}
# `and_raise` for error handling:
expect(interface).to receive(:implementation).and_raise(StandardError, "An error occurred")
```
## v0.32.0
- `Sus::Config` now has a `prepare_warnings!` hook which enables deprecated warnings by default. This is generally considered good behaviour for a test framework.
|