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 support for FreeSpec #408

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

trackiss
Copy link

@trackiss trackiss commented Aug 31, 2024

Add a FreeSpecDiscipline that can be used with AnyFreeSpec.

It inherits AnyFreeSpecLike to avoid errors in Scala 3.
If it is unacceptable, or if there is another better way, please help.

@trackiss trackiss marked this pull request as draft August 31, 2024 19:16
@trackiss trackiss marked this pull request as ready for review August 31, 2024 20:19
@TonioGela
Copy link
Member

Thanks @trackiss! I'm definitely not an expert in Scalatest, so can I ask you if you can provide an example (here as a comment) of what's currently possible with 2.13- but not 3?
Will it be possible for you to write a test that leverages this change and runs for all the scala versions we have configured in the build?

@trackiss
Copy link
Author

trackiss commented Sep 30, 2024

@TonioGela

thanks.

This code works fine in both Scala 2 and Scala 3! That comments refer to extremely limited cases.

It's not impossible to test without extending Any***SpecLike in ScalaTest, but nobody wants to do that.
The other ***SpecDiscipline can cover that limited case, but not FreeSpecDiscipline with Scala 3.

@TonioGela
Copy link
Member

@TonioGela

thanks.

This code works fine in both Scala 2 and Scala 3! That comments refer to extremely limited cases.

It's not impossible to test without extending Any***SpecLike in ScalaTest, but nobody wants to do that. The other ***SpecDiscipline can cover that limited case, but not FreeSpecDiscipline with Scala 3.

I see @trackiss. I'd still like to see a test to prove this is right before merging, idk what other maintainers think.

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