Changelog of @hackage/HMock 0.5.1.2

<h1 id="revision-history-for-hmock">Revision history for hmock</h1> <h2 id="0512----2023-11-28">0.5.1.2 -- 2023-11-28</h2> <ul> <li>Version bounds now allow GHC 9.6 and 9.8 </li> <li>Fix Quasi instance warning for GHC 9.4 </li> <li>Bumped dependency version upper bounds </li> </ul> <h2 id="0511----2022-09-18">0.5.1.1 -- 2022-09-18</h2> <ul> <li>Version bounds now allow GHC 9.4 </li> </ul> <h2 id="0510----2021-09-25">0.5.1.0 -- 2021-09-25</h2> <ul> <li>HMock works with more classes with superclass constraints. </li> <li>Classes with default methods are now fully mockable. </li> <li>Builds with GHC 9.2.1 </li> <li>Fixes for GHC 8.4 and 8.6 </li> </ul> <h2 id="0500----2021-09-25">0.5.0.0 -- 2021-09-25</h2> <ul> <li>HMock now depends on <code>Predicate</code> from the <code>explainable-predicates</code> package. </li> </ul> <h2 id="0400----2021-08-22">0.4.0.0 -- 2021-08-22</h2> <ul> <li>Dramatically simplified the Template Haskell API. <ul> <li><code>makeMockable</code> now expects a Type instead of a Name. Use <code>[t|MyClass|]</code>. </li> <li>Most other variants of <code>makeMockable</code> have been removed. Use <code>makeMockableWithOptions</code> instead. </li> <li><code>makeMockable</code> will now detect when instances already exist and won't redefine them. </li> <li><code>makeMockable [t|MyClass ConcreteType|]</code> now defines <code>Mockable</code> and <code>MockableBase</code> for any <code>MyClass</code> type. Only <code>MockT</code> instances use the concrete type. In some cases, you may need to add type annotations to your expectations. </li> </ul> </li> <li><code>MockSetup</code> can now add expectations. </li> <li>Added a lot more configuration for severity of faults: <ul> <li><code>setAmbiguityCheck</code> can now set to ignore, warning, or error. </li> <li>Added <code>setUninterestingActionCheck</code> for actions with no expectations. </li> <li>Added <code>setUnexpectedActionCheck</code> for actions that don't match expectations. </li> <li>Added <code>setUnmetExpectationCheck</code> for expectations that aren't met. </li> </ul> </li> <li>Predicates have undergone major updates. <ul> <li>Predicates now show more detailed messages when they fail. </li> <li>New <code>keys</code> and <code>values</code> predicates accept any child predicate. </li> <li>Removed <code>containsKey</code>, <code>containsEntry</code>, <code>keysAre</code>, and <code>entriesAre</code> <ul> <li>Instead of <code>containsEntry</code> or <code>entriesAre</code>, use <code>contains</code> or <code>unorderedElemsAre</code> with <code>zipP</code>. </li> </ul> </li> <li>New predicates: <code>positive</code>, <code>negative</code>, <code>nonPositive</code>, <code>nonNegative</code>. </li> </ul> </li> </ul> <h2 id="0300----2021-06-30">0.3.0.0 -- 2021-06-30</h2> <ul> <li>Methods with polymorphic return types can now be mocked if the return type has a <code>Typeable</code> constraint. </li> <li>Added <code>whenever</code> to associate a side effect to a method. </li> <li>Added <code>WholeMethodMatcher</code> to match entire method args at once. </li> <li><code>allowUnexpected</code> no longer changes the default for expected calls. </li> </ul> <h2 id="0200----2021-06-24">0.2.0.0 -- 2021-06-24</h2> <ul> <li>Added ambiguity checking. <ul> <li>This is an optional feature, which is off by default. </li> <li>To make it easier to avoid ambiguity, there is now an <code>allowUnexpected</code> that </li> <li>causes unexpected calls to be ignored and optionally provide a response, but doesn't conflict with expectations that override it. Ambiuguous uses of <code>expectAny</code> can often be replaced with <code>allowUnexpected</code>. </li> </ul> </li> <li>Restricted mockable setup to defaults to avoid race conditions. <ul> <li>Setup handlers now run in the <code>MockSetup</code> monad. </li> <li>Adding expectations from setup is no longer allowed. However, you can use <code>allowUnexpected</code> to allow unexpected calls. </li> </ul> </li> <li>Added <code>nestMockT</code> and <code>withNestedMockT</code> to the API. </li> <li>Exported smaller modules to make selective imports easier. </li> </ul> <h2 id="0101----2021-06-20">0.1.0.1 -- 2021-06-20</h2> <ul> <li>Fixed a bad dependency that broke some GHC versions. </li> </ul> <h2 id="0100----2021-06-20">0.1.0.0 -- 2021-06-20</h2> <ul> <li>First version. Released on an unsuspecting world. </li> </ul>