Git Product home page Git Product logo

Comments (6)

paulbutcher avatar paulbutcher commented on August 16, 2024

Good question. ScalaMock is compiled against Specs2 1.13. I'm not sure how to find out which version of Specs2 Play uses?

from scalamock.

missingfaktor avatar missingfaktor commented on August 16, 2024

Thank you for your prompt response.

Play uses Specs 1.12.3 but as we will explain below this is actually orthogonal to the issue.

Turns out the problem is with Specs2 1.13 itself. In Specs2, the signature of method around in AroundExample has been changed. However since you did not have override modifier in your implementation of around in MockingFactory, this change went undetected by the compiler.

Could you please make MockingFactory work with AroundExample in Specs2 1.13?

Thanks.

from scalamock.

missingfaktor avatar missingfaktor commented on August 16, 2024

The temporary work-around that we are using is as follows:

  • We add the latest ScalaMock core dependency.
  • We stick to the version of Specs2 provided by Play.
  • We copy the definition of MockFactory from your code and add it to our test utils. Since your implementation of MockFactory works fine with Specs2 1.12.3, this works without a problem.

from scalamock.

paulbutcher avatar paulbutcher commented on August 16, 2024

Sorry - this was my screwup. I "temporarily" disabled Specs2 support while waiting for a Specs2 release for a particular compiler pre-release and then forgot to reinstate it (blush).

from scalamock.

paulbutcher avatar paulbutcher commented on August 16, 2024

I've just released 3.0.1 (on Sonatype now - should be mirrored to Maven Central soon) which includes this fix.

from scalamock.

missingfaktor avatar missingfaktor commented on August 16, 2024

Again, thanks!

from scalamock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.