Closed GoogleCodeExporter closed 8 years ago
I forgot I got this error on 1.2RC4. I have hamcrest-all-1.2RC$ in path.
Original comment by bhup...@gmail.com
on 9 Apr 2009 at 8:24
I tried this on my machine and it works :) Can you try setting up a temporary
project to make sure the
dependencies are right. For example, is there a clash with something in your
version of JUnit? Can you check you
version of Matcher to make sure that it has the missing method?
Original comment by smgfree...@gmail.com
on 10 Apr 2009 at 7:45
Issue not confirmed, so closing. Will reopen if asked.
Original comment by smgfree...@gmail.com
on 25 Apr 2009 at 8:47
I am seeing the same issue when running in Eclipse with JUnit 4.4
Original comment by cmichael...@netscape.net
on 8 May 2009 at 3:58
[deleted comment]
A thought. Are you using the no-dependencies version of JUnit. If not, you
might be picking up the previous
Matcher that's included with JUnit.
Original comment by smgfree...@gmail.com
on 8 May 2009 at 10:56
I had the same problem with org.hamcrest.Matcher being picked up in the JUnit
4.4 JAR.
Changing to the no dependencies version (albeit 4.6) didn't work by itself -- I
also had to
change to the no dependencies versions of Mockito and Hamcrest.
With only these JARs on the build path, this problem is resolved for me:
* junit-dep-4.6.jar
* hamcrest-core-1.2.jar
* mockito-core-1.7.jar
* objenesis-1.0.jar
It seems that the org.hamcrest.Matcher included in mockito-all-1.7.jar is from
Hamcrest 1.1
(i.e. does not have the describeMismatch() method) even though Mockito appears
to depend on
Hamcrest 1.2. I checked in the full distribution of Mockito 1.7 and it
incluedes hamcrest-
all-1.1.jar (1.8.0-rc1 seems to have this problem too? Or is it just me doing
something
silly?).
Anyhow, Mockito rocks my world :-) Now we just need to migrate to Maven...
Original comment by todd1...@gmail.com
on 18 Jun 2009 at 2:21
I had this problem in Eclipse. It's dependant on the class path order - it only
works
for me if junit-4.8.1.jar is loaded after the hamcrest jars, so that the newer
version of the Matcher interface is used. You can modify the order easily
enough in
the project properties.
I suppose this will become unnecessary whenever JUnit updates the version of
Matcher
it embeds to have the describeMismatch() method, thus dropping support for older
versions of Hamcrest.
Original comment by nickhowes
on 23 Feb 2010 at 4:57
You should the junit-dep jar which does not include Hamcrest. (it's a bit
confusing since perhaps it should be
junit-no-dep)
Original comment by smgfree...@gmail.com
on 23 Feb 2010 at 7:18
Original issue reported on code.google.com by
bhup...@gmail.com
on 9 Apr 2009 at 8:23