Comments (6)
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.
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.
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 ofMockFactory
works fine with Specs2 1.12.3, this works without a problem.
from scalamock.
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.
I've just released 3.0.1 (on Sonatype now - should be mirrored to Maven Central soon) which includes this fix.
from scalamock.
Again, thanks!
from scalamock.
Related Issues (20)
- Mistake in scalamock documentation HOT 2
- Update to ScalaMock 5.1.0 breaks argument matching
- Is this project maintained anymore? HOT 4
- Scala 3 Support HOT 4
- Cannot mock class that uses the "pimp my library" pattern HOT 1
- Massive logs when mocked method relies on type class derivation HOT 1
- Specs2 Example Test Not Failing When Assertion Changed
- Verifying the number of invocations is unreliable HOT 1
- ScalaMock macro does not infer/resolve context-bound type-parameters correctly
- Documentation: Mocking 0-parameter function and parameterless function HOT 1
- explicit wrapping in withExpectations needed when working with specs2 Specification
- "Error while emitting" on wrong mock usage HOT 1
- Testing scala Parser and get `Parameter type in structural refinement may not refer to an abstract type defined outside that refinement`
- update github pages docs for scala 3
- Scala 3 PathDependent Mock issue HOT 2
- Scala 3 regression from Scala 2.13 expected a term symbol but received val <none> HOT 2
- Mocking Slick Table results in compile error HOT 5
- Scala3 Intersection Type Issue HOT 2
- union / intersection type and generic class issue HOT 3
- Mocking classes with constructor params with applied types fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalamock.