Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jul 13, 2025

This PR contains the following updates:

Package Type Update Change
mimic (source) dev major ~> 1.7 -> ~> 2.0

Release Notes

edgurgel/mimic (mimic)

v2.2.0

Compare Source

v2.1.1

Compare Source

v2.1.0

Compare Source

v2.0.2

Compare Source

  • fix: Mimic.Module compilation when no options are stored. #​101

v2.0.1

Compare Source

  • Bump ham requirement

v2.0.0

Compare Source

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)

 assert Calculator.add(1, 1) == :expected1
 assert Calculator.add(1, 1) == :expected2
 assert Calculator.add(1, 1) == 2

This way once all expectations are fulfilled the original function is called again.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title chore(deps): update dependency mimic to v2 chore(deps): update dependency mimic to v2 - autoclosed Jul 30, 2025
@renovate renovate bot closed this Jul 30, 2025
@renovate renovate bot deleted the renovate/mimic-2.x branch July 30, 2025 21:58
@renovate renovate bot changed the title chore(deps): update dependency mimic to v2 - autoclosed chore(deps): update dependency mimic to v2 Jul 31, 2025
@renovate renovate bot reopened this Jul 31, 2025
@renovate renovate bot force-pushed the renovate/mimic-2.x branch from 9dd9940 to 7e0c0d5 Compare July 31, 2025 09:14
@renovate renovate bot force-pushed the renovate/mimic-2.x branch from 7e0c0d5 to 1e7b12f Compare August 8, 2025 09:24
@coderabbitai
Copy link

coderabbitai bot commented Aug 8, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch renovate/mimic-2.x

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@renovate renovate bot force-pushed the renovate/mimic-2.x branch 2 times, most recently from 66f47e2 to b6e1fa3 Compare August 12, 2025 01:13
@renovate renovate bot force-pushed the renovate/mimic-2.x branch from b6e1fa3 to cfad35f Compare August 31, 2025 10:59
@renovate renovate bot force-pushed the renovate/mimic-2.x branch from cfad35f to 830e893 Compare September 20, 2025 08:52
@renovate renovate bot force-pushed the renovate/mimic-2.x branch from 830e893 to 5408ecd Compare October 21, 2025 21:39
@renovate renovate bot force-pushed the renovate/mimic-2.x branch from 5408ecd to 83a218d Compare November 18, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant