Commit 5abaad3
authored
build(deps-dev): bump mimic from 1.12.0 to 2.0.0 (#133)
Bumps [mimic](https://github.com/edgurgel/mimic) from 1.12.0 to 2.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/edgurgel/mimic/releases">mimic's
releases</a>.</em></p>
<blockquote>
<h2>Mimic 2.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat!: change expect/3,4 to not call original once fulfilled by <a
href="https://github.com/edgurgel"><code>@edgurgel</code></a> in <a
href="https://redirect.github.com/edgurgel/mimic/pull/98">edgurgel/mimic#98</a></li>
</ul>
<h2>Breaking changes</h2>
<p>The code below would call the original <code>Calculator.add/2</code>
when all expectations were fulfilled.</p>
<pre lang="elixir"><code> Calculator
|> expect(:add, fn _, _ -> :expected1 end)
|> expect(:add, fn _, _ -> :expected2 end)
<p>assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
assert Calculator.add(1, 1) == 2
</code></pre></p>
<p>Now with Mimic 2 this will raise:</p>
<pre lang="elixir"><code> Calculator
|> expect(:add, fn _, _ -> :expected1 end)
|> expect(:add, fn _, _ -> :expected2 end)
<p>assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
Calculator.add(1, 1)</p>
<h1>Will raise error because more than 2 calls to Calculator.add were
made and there is no stub</h1>
<h1>** (Mimic.UnexpectedCallError) Calculator.add/2 called in process
#PID<.*> but expectations are already fulfilled</h1>
<p></code></pre></p>
<p>If there is a stub the stub will be called instead. This behaviour is
the same as before.</p>
<pre lang="elixir"><code> Calculator
|> expect(:add, fn _, _ -> :expected1 end)
|> expect(:add, fn _, _ -> :expected2 end)
|> stub(:add, fn _, _ -> :stub end)
<p>assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
assert Calculator.add(1, 1) == :stub
</code></pre></p>
<p>Which means that if someone wants to keep the original behaviour on
Mimic 1.* just do the following:</p>
<pre lang="elixir"><code> Calculator
|> expect(:add, fn _, _ -> :expected1 end)
</tr></table>
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/edgurgel/mimic/blob/main/CHANGELOG.md">mimic's
changelog</a>.</em></p>
<blockquote>
<h1>2.0.0 (2025-07-13)</h1>
<h2>Breaking changes</h2>
<p>The code below would call the original <code>Calculator.add/2</code>
when all expectations were fulfilled.</p>
<pre lang="elixir"><code> Calculator
|> expect(:add, fn _, _ -> :expected1 end)
|> expect(:add, fn _, _ -> :expected2 end)
<p>assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
assert Calculator.add(1, 1) == 2
</code></pre></p>
<p>Now with Mimic 2 this will raise:</p>
<pre lang="elixir"><code> Calculator
|> expect(:add, fn _, _ -> :expected1 end)
|> expect(:add, fn _, _ -> :expected2 end)
<p>assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
Calculator.add(1, 1)</p>
<h1>Will raise error because more than 2 calls to Calculator.add were
made and there is no stub</h1>
<h1>** (Mimic.UnexpectedCallError) Calculator.add/2 called in process
#PID<.*> but expectations are already fulfilled</h1>
<p></code></pre></p>
<p>If there is a stub the stub will be called instead. This behaviour is
the same as before.</p>
<pre lang="elixir"><code> Calculator
|> expect(:add, fn _, _ -> :expected1 end)
|> expect(:add, fn _, _ -> :expected2 end)
|> stub(:add, fn _, _ -> :stub end)
<p>assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
assert Calculator.add(1, 1) == :stub
</code></pre></p>
<p>Which means that if someone wants to keep the original behaviour on
Mimic 1.* just do the following:</p>
<pre lang="elixir"><code> Calculator
|> expect(:add, fn _, _ -> :expected1 end)
|> expect(:add, fn _, _ -> :expected2 end)
|> stub(:add, fn x, y -> call_original(Calculator, :add, [x, y])
end)
</tr></table>
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/edgurgel/mimic/commit/fee266247b642b0f117e3aafbf0b7c4a0eb50e0a"><code>fee2662</code></a>
feat!: change expect/3,4 to not call original once fulfilled (<a
href="https://redirect.github.com/edgurgel/mimic/issues/98">#98</a>)</li>
<li>See full diff in <a
href="https://github.com/edgurgel/mimic/compare/v1.12.0...v2.0.0">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent 752a031 commit 5abaad3
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments