Releases
v0.37.2
- Make
Sus::Fixtures::TemporaryDirectoryContextignore temporary directory cleanup failures.
v0.37.1
- Fixed
Sus::Mock#wrapto forward blocks to the original method, and fixedreceive(...).with_block(...)to use the supplied predicate.
v0.37.0
- Long values in verbose (and failure) output are now truncated to a configurable length (default 100 characters), preventing huge objects from flooding the output. Set the
SUS_OUTPUT_VARIABLE_TRUNCATION_LIMITenvironment variable to change the limit, or0to disable truncation.
v0.36.0
- Hard code
XTermoutput for GitHub Actions, as it supports ANSI escape codes.
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-contextgem.
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.
# `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::Confignow has aprepare_warnings!hook which enables deprecated warnings by default. This is generally considered good behaviour for a test framework.