Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Question: Define common Diffs in a shared trait #458

Open
matankdr opened this issue Dec 5, 2023 · 0 comments
Open

Question: Define common Diffs in a shared trait #458

matankdr opened this issue Dec 5, 2023 · 0 comments

Comments

@matankdr
Copy link
Contributor

matankdr commented Dec 5, 2023

I would like to define common Diff instances to be used in multiple test suites.
However, when defined something like:

trait MyCommonDiffs {
  implicit val diffA: Diff[A] = ???
  implicit val diffB: Diff[B] = ???
}

and mixed in test suite:

class MyTest extends SpecificationWithJUnit with MyCommonDiffs {
...
}

The implicit Diff instances were not recognized by matchTo matcher.
Is there any best practices of how to summon implicit Diffs defined in a common trait/lib?

cc @galtoren

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

No branches or pull requests

1 participant