You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* When spying on a method that takes a block, the block now gets forwarded to the original method ([#78](https://github.com/clarkedb/grift/pull/78))
16
+
* When mocking the implementation, if a block is not provided a `Grift::Error` is raised instead of a `LocalJumpError` ([#77](https://github.com/clarkedb/grift/pull/77))
This version adds true keyword argument support for Ruby 3. See below for how to handle breaking changes.
21
+
13
22
### Changed
14
23
15
24
* Dropped support for Ruby 2.5 ([#69](https://github.com/clarkedb/grift/pull/69))
16
25
* Dropped support for Ruby 2.6 ([#72](https://github.com/clarkedb/grift/pull/72))
17
26
* To support keyword arguments, records of call arguments are no longer stored in simple arrays but in a custom Enumerable ([#72](https://github.com/clarkedb/grift/pull/72))
18
27
+ This changes the way that your tests will interact with mock calls
19
28
+ When before `calls` returned an array, it returns a `Grift::MockMethod::MockExecutions::MockArguments` object
20
-
+ Migrating to maintain previous behavior just requires appending `.args` to `calls`
29
+
+ Migrating to maintain previous behavior just requires appending `.args` to `calls[i]`
<spanclass='id identifier rubyid_raise'>raise</span><spanclass='lparen'>(</span><spanclass='const'><spanclass='object_link'><ahref="../Grift.html" title="Grift (module)">Grift</a></span></span><spanclass='op'>::</span><spanclass='const'><spanclass='object_link'><ahref="Error.html" title="Grift::Error (class)">Error</a></span></span><spanclass='comma'>,</span><spanclass='tstring'><spanclass='tstring_beg'>'</span><spanclass='tstring_content'>Must provide a block for the new implementation</span><spanclass='tstring_end'>'</span></span><spanclass='rparen'>)</span><spanclass='kw'>unless</span><spanclass='id identifier rubyid_block_given?'>block_given?</span>
<spanclass='id identifier rubyid_mock_executions'>mock_executions</span><spanclass='op'>=</span><spanclass='ivar'>@mock_executions</span><spanclass='comment'># required to access inside class instance block
0 commit comments