Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Req.Test.allow/3 #315

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Add Req.Test.allow/3 #315

merged 2 commits into from
Feb 29, 2024

Conversation

whatyouhide
Copy link
Contributor

No description provided.

@@ -72,6 +77,35 @@ defmodule Req.Test do

assert MyApp.Weather.get_rating("Krakow, Poland") == {:ok, :nice}
end

### Concurrency and Allowances
Copy link
Owner

@wojtekmach wojtekmach Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great.

I believe explicit allowances are not necessary a lot of the time (Task, Task.Supervisor, controller and live view test helpers propagate $callers) so I don't want to leave an impression that it is always necessary when we spawn another process but I'm not sure how to document this best. Perhaps leave this vague that usually it's not necessary but if spawned process cannot find stub, it needs to be explicitly allowed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wojtekmach that's a really good point. Rephrased, wdyt now?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@wojtekmach wojtekmach merged commit 2ab8f73 into wojtekmach:main Feb 29, 2024
2 checks passed
@whatyouhide whatyouhide deleted the al/test-allow branch February 29, 2024 12:15
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.

2 participants