Fix test suite on Ruby 2.6.

epel9
Vít Ondruch 6 years ago
parent 3d29b07197
commit 4bb8fc5e16

@ -0,0 +1,32 @@
From 2908365366792ac3ba010fa32bc3be2beaed451a Mon Sep 17 00:00:00 2001
From: Samuel Williams <samuel.williams@oriontransfer.co.nz>
Date: Sun, 16 Dec 2018 11:32:45 +1300
Subject: [PATCH] Use raw Pathname to fix Linux specs.
---
spec/lib/listen/adapter/linux_spec.rb | 12 +-----------
1 file changed, 1 insertions(+), 11 deletions(-)
diff --git a/spec/lib/listen/adapter/linux_spec.rb b/spec/lib/listen/adapter/linux_spec.rb
index d77f0c0..da48319 100644
--- a/spec/lib/listen/adapter/linux_spec.rb
+++ b/spec/lib/listen/adapter/linux_spec.rb
@@ -10,17 +10,7 @@
end
if linux?
- let(:dir1) do
- instance_double(
- Pathname,
- 'dir1',
- to_s: '/foo/dir1',
- cleanpath: real_dir1
- )
- end
-
- # just so cleanpath works in above double
- let(:real_dir1) { instance_double(Pathname, 'dir1', to_s: '/foo/dir1') }
+ let(:dir1) {Pathname.new("/foo/dir1")}
let(:config) { instance_double(Listen::Adapter::Config) }
let(:queue) { instance_double(Queue) }

@ -11,6 +11,10 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/guard/listen.git && cd listen
# git checkout v3.1.5 && tar czvf rubygem-listen-3.1.5-tests.tgz spec
Source1: rubygem-listen-%{version}-tests.tgz
# Fix test suite on Ruby 2.6.
# https://github.com/guard/listen/commit/466594233b9ee4377cc9f3a845ab8c60b33134a8
# https://github.com/guard/listen/commit/2908365366792ac3ba010fa32bc3be2beaed451a
Patch0: rubygem-listen-3.1.5-Fix-issue-with-2.6.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
@ -35,6 +39,10 @@ Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b 1
pushd %{_builddir}
%patch0 -p1
popd
# Remove the hardcoded dependencies. We don't have them in Fedora
# (except rb-inotify), they are platform specifis and not needed.
# https://github.com/guard/listen/pull/54
@ -96,6 +104,7 @@ popd
%changelog
* Mon Jan 28 2019 Vít Ondruch <vondruch@redhat.com> - 3.1.5-6
- Fix test suite on Ruby 2.6.
- .spec file refresh.
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-5

Loading…
Cancel
Save