diff --git a/jmock-junit4.13.patch b/jmock-junit4.13.patch new file mode 100644 index 0000000..3db20af --- /dev/null +++ b/jmock-junit4.13.patch @@ -0,0 +1,14 @@ +--- a/jmock-junit4/src/test/java/org/jmock/test/acceptance/junit4/JUnit4TestRunnerTests.java ++++ b/jmock-junit4/src/test/java/org/jmock/test/acceptance/junit4/JUnit4TestRunnerTests.java +@@ -47,9 +47,8 @@ public class JUnit4TestRunnerTests exten + public void testDetectsNonPublicBeforeMethodsCorrectly() { + listener.runTestIn(JUnit4TestWithNonPublicBeforeMethod.class); + listener.assertTestFailedWith(Throwable.class); +- assertEquals("should have detected non-public before method", +- "Method before() should be public", +- listener.failure.getMessage()); ++ assertTrue("should have detected non-public before method", ++ listener.failure.getMessage().contains("Method before() should be public")); + } + + public void testAutoInstantiatesMocks() { diff --git a/jmock.spec b/jmock.spec index 6f2a481..391263c 100644 --- a/jmock.spec +++ b/jmock.spec @@ -1,11 +1,14 @@ Name: jmock Version: 2.12.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Java library for testing code with mock objects License: BSD URL: http://www.jmock.org/ Source0: https://github.com/jmock-developers/jmock-library/archive/%{version}/%{name}-%{version}.tar.gz +# Adapt to junit 4.13 +# See https://github.com/jmock-developers/jmock-library/pull/200 +Patch0: %{name}-junit4.13.patch BuildArch: noarch @@ -108,7 +111,7 @@ This package contains javadoc for %{name}. %prep -%setup -q -n %{name}-library-%{version} +%autosetup -p1 -n %{name}-library-%{version} # remove unnecessary dependency on parent POM %pom_remove_parent @@ -158,6 +161,9 @@ This package contains javadoc for %{name}. %changelog +* Sat Aug 15 2020 Jerry James - 2.12.0-2 +- Add jmock-junit4.13.patch to fix test failure with junit4.13 + * Tue Jul 28 2020 Fabio Valentini - 2.12.0-1 - Update to version 2.12.0.