Skip to content

chore(deps-dev): bump mimic from 1.12.0 to 2.0.0#80

Merged
zachdaniel merged 1 commit intomainfrom
dependabot/hex/mimic-2.0.0
Jul 15, 2025
Merged

chore(deps-dev): bump mimic from 1.12.0 to 2.0.0#80
zachdaniel merged 1 commit intomainfrom
dependabot/hex/mimic-2.0.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Jul 15, 2025

Bumps mimic from 1.12.0 to 2.0.0.

Release notes

Sourced from mimic's releases.

Mimic 2.0.0

What's Changed

Breaking changes

The code below would call the original Calculator.add/2 when all expectations were fulfilled.

 Calculator
 |> expect(:add, fn _, _ -> :expected1 end)
 |> expect(:add, fn _, _ -> :expected2 end)
assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
assert Calculator.add(1, 1) == 2

Now with Mimic 2 this will raise:

 Calculator
 |> expect(:add, fn _, _ -> :expected1 end)
 |> expect(:add, fn _, _ -> :expected2 end)
assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
Calculator.add(1, 1)
Will raise error because more than 2 calls to Calculator.add were made and there is no stub
** (Mimic.UnexpectedCallError) Calculator.add/2 called in process #PID<.*> but expectations are already fulfilled

If there is a stub the stub will be called instead. This behaviour is the same as before.

 Calculator
 |> expect(:add, fn _, _ -> :expected1 end)
 |> expect(:add, fn _, _ -> :expected2 end)
 |> stub(:add, fn _, _ -> :stub end)
assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
assert Calculator.add(1, 1) == :stub

Which means that if someone wants to keep the original behaviour on Mimic 1.* just do the following:

 Calculator
 |> expect(:add, fn _, _ -> :expected1 end)
</tr></table> 

... (truncated)

Changelog

Sourced from mimic's changelog.

2.0.0 (2025-07-13)

Breaking changes

The code below would call the original Calculator.add/2 when all expectations were fulfilled.

 Calculator
 |> expect(:add, fn _, _ -> :expected1 end)
 |> expect(:add, fn _, _ -> :expected2 end)
assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
assert Calculator.add(1, 1) == 2

Now with Mimic 2 this will raise:

 Calculator
 |> expect(:add, fn _, _ -> :expected1 end)
 |> expect(:add, fn _, _ -> :expected2 end)
assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
Calculator.add(1, 1)
Will raise error because more than 2 calls to Calculator.add were made and there is no stub
** (Mimic.UnexpectedCallError) Calculator.add/2 called in process #PID<.*> but expectations are already fulfilled

If there is a stub the stub will be called instead. This behaviour is the same as before.

 Calculator
 |> expect(:add, fn _, _ -> :expected1 end)
 |> expect(:add, fn _, _ -> :expected2 end)
 |> stub(:add, fn _, _ -> :stub end)
assert Calculator.add(1, 1) == :expected1
assert Calculator.add(1, 1) == :expected2
assert Calculator.add(1, 1) == :stub

Which means that if someone wants to keep the original behaviour on Mimic 1.* just do the following:

 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> 

... (truncated)

Commits

Dependabot compatibility score

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 commands and options

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)

Bumps [mimic](https://github.com/edgurgel/mimic) from 1.12.0 to 2.0.0.
- [Release notes](https://github.com/edgurgel/mimic/releases)
- [Changelog](https://github.com/edgurgel/mimic/blob/main/CHANGELOG.md)
- [Commits](edgurgel/mimic@v1.12.0...v2.0.0)

---
updated-dependencies:
- dependency-name: mimic
  dependency-version: 2.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update elixir code labels Jul 15, 2025
@zachdaniel zachdaniel merged commit a4a4062 into main Jul 15, 2025
22 checks passed
@dependabot dependabot bot deleted the dependabot/hex/mimic-2.0.0 branch July 15, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file elixir Pull requests that update elixir code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant