All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
None
3.1.0 - 2026-01-03
- Official support for Ruby 4.0 (#274)
3.0.0 - 2024-12-26
- All mocks are now scoped to the current thread for thread-safety (#256)
- For parallelized test suites using processes this is not a breaking change
- This fixes intermittent test failures sometimes seen when codebases have threads calling mocked methods
- Official support for Ruby 3.4 (#257)
- Direct access to mock results/calls without calling
mock(#258)
2.2.0 - 2024-01-13
- Official support for Ruby 3.3 (#203)
2.1.0 - 2022-12-27
- Official support for Ruby 3.2 (#126)
- Support for finite/self-terminating mocking for more precision in testing where a method may get called multiple times
2.0.1 - 2022-03-27
- When spying on a method that takes a block, the block now gets forwarded to the original method (#78)
- When mocking the implementation, if a block is not provided a
Grift::Erroris raised instead of aLocalJumpError(#77)
2.0.0 - 2022-03-14
This version adds true keyword argument support for Ruby 3. See below for how to handle breaking changes.
- Dropped support for Ruby 2.5 (#69)
- Dropped support for Ruby 2.6 (#72)
- To support keyword arguments, records of call arguments are no longer stored in simple arrays but in a custom Enumerable (#72)
- This changes the way that your tests will interact with mock calls
- When before
callsreturned an array, it returns aGrift::MockMethod::MockExecutions::MockArgumentsobject - Migrating to maintain previous behavior just requires appending
.argstocalls[i]
- Support for mocking private instance and class methods (#68)
- Support for mocking methods that take positional and keyword arguments (#72)
- When mocking protected methods, the method now remains protected while mocked and after unmocking (#68)
- When mocking inherited methods, the method goes back to the ancestor's definition after unmocking (#69)
- When mocking methods with keyword arugments in Ruby 3.x, no error is thrown (#72)
1.1.0 - 2022-02-03
This version adds support for Ruby 3.1 and updates various dependencies.
- Support Ruby 3.1 (#52)
1.0.2 - 2021-11-11
This version fixes a bug that prevented the mocking of methods defined by a class's super class.
- Allow mocks of inherited methods (#34)
1.0.1 - 2021-11-10
This version fixes a bug that prevented most mocking features in Grift from functioning as expected.
- Uses relative path for yaml config files (#28)
1.0.0 - 2021-11-06
The first major version of Grift! 100% documentation and 100% code coverage.
- Spying on method (#9)
- Mocking method return values (#9)
- Mocking method implementation (#13)
- Restricted methods that cannot be mocked (#20)
- MiniTest Plugin to use hooks and clean up after tests (#17)
- Documentation! (#23)
0.1.0 - 2021-10-12
The initial version of Grift. This was never intended for use and should be considered deprecated.