Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 26, 2025

Bumps mimic from 1.11.0 to 2.0.2.

Release notes

Sourced from mimic's releases.

Mimic 2.0.2

What's Changed

Full Changelog: edgurgel/mimic@v2.0.1...v2.0.2

Mimic 2.0.1

  • Bump ham requirement

Full Changelog: edgurgel/mimic@v2.0.0...v2.0.1

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)
</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
  • 5d97731 fix: Mimic.Module compilation when no options are stored (#101)
  • 9ea3016 chore: bump version 2.0.1
  • 03e180e chore: bump ham requirement
  • fee2662 feat!: change expect/3,4 to not call original once fulfilled (#98)
  • 6438f76 Bump version
  • c6a8cfb feat: Mimic.calls/3 to list args from each call
  • de555b0 Bump patch version
  • d9f2da3 don't soft reset if repeat_until_failure is 0
  • 5fa3447 Bump version
  • bab2acf Merge pull request #91 from sgtpepper43/fix/repeat-until-failure
  • Additional commits viewable in compare view

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.11.0 to 2.0.2.
- [Release notes](https://github.com/edgurgel/mimic/releases)
- [Changelog](https://github.com/edgurgel/mimic/blob/main/CHANGELOG.md)
- [Commits](edgurgel/mimic@v1.11.0...v2.0.2)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code labels Aug 26, 2025
Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 2, 2025

Superseded by #189.

@dependabot dependabot bot closed this Sep 2, 2025
@dependabot dependabot bot deleted the dependabot/hex/mimic-2.0.2 branch September 2, 2025 13:14
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.

0 participants