Substitute to removed MatcherAdapter[T]

7 views
Skip to first unread message

Nimrod Argov

unread,
Apr 27, 2015, 11:01:33 AM4/27/15
to specs2...@googlegroups.com
Hey,

A while back we wrote a JMock integration for specs2. As JMock expects hamcrest matchers, we used MatcherAdapter to convert.
Now I'm trying to upgrade to specs2 3.5, but I see that MatcherAdapter was removed.

Is there a good alternative, or should I just reintroduce the class in my code?

Thanks!

Nimrod

etorreborre

unread,
Apr 27, 2015, 6:36:43 PM4/27/15
to specs2...@googlegroups.com
Hi Nimrod

The MatcherAdapter for Hamcrest is there:


If you mix-in the org.specs2.mock.Mockito.ArgThat trait (or import the object members) you should have some implicit conversion from specs2 matchers to Hamcrest matchers.

Eric.
Reply all
Reply to author
Forward
0 new messages