Specs2 discipline does not compile with mutable specifications
agentcoops opened this issue · 3 comments
The following straight forward test does not compile with the current version of discipline:
package org.typelevel.discipline
package specs2
import org.specs2.mutable.Specification
class MutableDisciplineSpec extends Specification with Discipline
The error message received is that:
[error] self-type pellucid.pframe.ColumnAlgebrasSpec does not conform to
org.typelevel.discipline.specs2.Discipline's selftype
org.typelevel.discipline.specs2.Discipline
with org.specs2.SpecificationLike
The problem is that mutable provides its own SpecificationLike that does not inherit from the root SpecificationLike, even though it satisfies the interface. This means that replacing the self-type in the definition of the Discipline trait with extension fixes the issue as seen in my pull request. Similarly, replacing the dependency on SpecificationLike with "SpecificationStructure with SpecificationFeatures" would do the trick.
However, I'm not sure whether what is ultimately desirable, here, is a fix to discipline or specs2.
Thanks for your report. Paging @etorreborre.
The SpecificationFeatures
in mutable.SpecificationLike
is different from the org.specs2.SpecificationFeatures
because some of the traits it mixes are of the mutable
flavour. I guess that this means that a org.specs2.discipline.specs2.mutable.Discipline
trait is desirable.
Sorry that this took so long. I followed @etorreborre's suggestion. Does this work for you, @agentcoops?