v0.4.0 Beta 2
Pre-release
Pre-release
JosiahWitt
released this
05 Feb 17:30
·
25 commits
to master
since this release
Since v0.4.0
is going to be a larger release, we're starting with a short series of beta releases.
Changes
- Global
- Renamed
ensurepkg
toensurer
andensurepkg.Ensure
toensurer.E
in a backwards compatible way.ensurepkg
is marked as deprecated, and you are encourage to find and replace all references at your earliest convenience.ensurepkg
may be removed in an upcoming release.
- Renamed
ensure.RunTableByIndex
:- The underlying implementation was refactored from the ground up to make it much more extensible and testable in the future
- Mocks can be completely ignored using the
`ensure:"-"`
tag, in addition to the existing`ensure:"ignoreunused"`
tag for making them optional ⚠️ Breaking Change: Unused mocks are now an error unless they are ignored (`ensure:"-"`
) or optional (`ensure:"ignoreunused"`
)- Warnings are no longer issued, since unused mocks are now an error
- Supports embedded pointer fields in structs and mocks instead of only embedded non-pointer fields
- Correctly handles "shadowed" fields in embedded fields in both
Subject
andMocks
- Duplicate mocks are now supported, but will cause errors when matching a Subject, unless one of them is ignored (
`ensure:"-"`
) or optional (`ensure:"ignoreunused"`
)