[mockito] Patched LocalizedMatcher due to hamcrest update, (bug upstream)
Tomas Radej
tradej at fedoraproject.org
Mon Apr 8 11:10:42 UTC 2013
commit 3261caf4f030a9fb78306551bfabae32fa2236e1
Author: Tomas Radej <tradej at redhat.com>
Date: Fri Apr 5 16:28:28 2013 +0200
Patched LocalizedMatcher due to hamcrest update, (bug upstream)
mockito-matcher.patch | 24 ++++++++++++++++++++++++
mockito.spec | 7 ++++++-
2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/mockito-matcher.patch b/mockito-matcher.patch
new file mode 100644
index 0000000..71572d7
--- /dev/null
+++ b/mockito-matcher.patch
@@ -0,0 +1,24 @@
+diff --git a/src/org/mockito/internal/matchers/LocalizedMatcher.java b/src/org/mockito/internal/matchers/LocalizedMatcher.java
+index 01e83b3..7d249f5 100644
+--- a/src/org/mockito/internal/matchers/LocalizedMatcher.java
++++ b/src/org/mockito/internal/matchers/LocalizedMatcher.java
+@@ -16,6 +16,12 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
+ private final Matcher actualMatcher;
+ private Location location;
+
++ /* This is a hack for Fedora. Bug has been filed here:
++ * https://code.google.com/p/mockito/issues/detail?id=428 */
++ public void describeMismatch(Object item, Description mismatchDescription) {
++ mismatchDescription.appendText("was ").appendValue(item);
++ }
++
+ public LocalizedMatcher(Matcher actualMatcher) {
+ this.actualMatcher = actualMatcher;
+ this.location = new Location();
+@@ -65,4 +71,4 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
+ public Matcher getActualMatcher() {
+ return actualMatcher;
+ }
+-}
+\ No newline at end of file
++}
diff --git a/mockito.spec b/mockito.spec
index 2bd4b30..6883fdd 100644
--- a/mockito.spec
+++ b/mockito.spec
@@ -1,6 +1,6 @@
Name: mockito
Version: 1.9.0
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: A Java mocking framework
License: MIT
@@ -11,6 +11,7 @@ Patch0: fixup-ant-script.patch
Patch1: fix-cglib-refs.patch
Patch2: maven-cglib-dependency.patch
Patch3: fix-bnd-config.patch
+Patch4: %{name}-matcher.patch
BuildArch: noarch
BuildRequires: jpackage-utils
@@ -51,6 +52,7 @@ This package contains the API documentation for %{name}.
# Set Bundle-Version properly
sed -i 's/Bundle-Version= ${version}/Bundle-Version= %{version}/' conf/mockito-core.bnd
%patch3
+%patch4 -p1
%build
ant jar javadoc
@@ -86,6 +88,9 @@ cp -rp target/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%doc NOTICE
%changelog
+* Mon Mar 25 2013 Tomas Radej <tradej at redhat.com> - 1.9.0-12
+- Patched LocalizedMatcher due to hamcrest update, (bug upstream)
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.9.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list