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

Allow to reset async for ExUnit.Case by using it again #9360

Merged
merged 5 commits into from
Sep 22, 2019

Conversation

kelvinst
Copy link
Contributor

Closes #9355

@kelvinst kelvinst changed the title Warning double uses on ExUnit.Case with different options Warn double uses on ExUnit.Case with different options Sep 21, 2019
lib/ex_unit/lib/ex_unit/case.ex Outdated Show resolved Hide resolved
lib/ex_unit/test/ex_unit/case_test.exs Outdated Show resolved Hide resolved
lib/ex_unit/lib/ex_unit/case.ex Outdated Show resolved Hide resolved
test "async must be true", context do
assert context.async
end
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Couldn't find a better way to check the value saved to async attribute.

@kelvinst kelvinst changed the title Warn double uses on ExUnit.Case with different options Allow to reset async for ExUnit.Case by using it again Sep 22, 2019
@whatyouhide
Copy link
Member

So I'm confused: the original issue #9355 is about warning if ExUnit.Case is used multiple times, but now we're merging the options and not emitting warnings. 🤔

@josevalim
Copy link
Member

We want to allow it to be called multiples times because of case template. So we are fixing it so it works as expected if called multiple times (i.e. latest option wins).

@whatyouhide whatyouhide merged commit 96c187e into elixir-lang:master Sep 22, 2019
@whatyouhide
Copy link
Member

@josevalim got it!

Thanks @kelvinst! 💟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Warn when ExUnit.Case is used multiple times
3 participants