[arch-commits] Commit in ruby-rack-test/trunk (PKGBUILD disable-broken-test.patch)

Tim Meusel bastelfreak at archlinux.org
Wed Feb 24 19:41:02 UTC 2021


    Date: Wednesday, February 24, 2021 @ 19:41:02
  Author: bastelfreak
Revision: 871877

ruby-rack-test: enable tests during build

Added:
  ruby-rack-test/trunk/disable-broken-test.patch
Modified:
  ruby-rack-test/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   16 +++++++++-------
 disable-broken-test.patch |   23 +++++++++++++++++++++++
 2 files changed, 32 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-02-24 19:40:53 UTC (rev 871876)
+++ PKGBUILD	2021-02-24 19:41:02 UTC (rev 871877)
@@ -3,7 +3,7 @@
 _gemname='rack-test'
 pkgname="ruby-${_gemname}"
 pkgver=1.1.0
-pkgrel=2
+pkgrel=3
 pkgdesc='small, simple testing API for Rack apps'
 arch=('any')
 url='https://github.com/rack/rack-test'
@@ -10,12 +10,13 @@
 license=('MIT')
 depends=('ruby' 'ruby-rack')
 makedepends=('ruby-rdoc' 'ruby-rake')
-checkdepends=('ruby-rspec')
+checkdepends=('ruby-rspec' 'ruby-sinatra')
 options=('!emptydirs')
-source=("${url}/archive/v${pkgver}/${_gemname}-v${pkgver}.tar.gz" 'disable-rubocop.patch' 'disable-simplecov.patch')
+source=("${url}/archive/v${pkgver}/${_gemname}-v${pkgver}.tar.gz" 'disable-rubocop.patch' 'disable-simplecov.patch' 'disable-broken-test.patch')
 sha512sums=('36d947d9b13d33ee8322e5b9d18fe8266787ccb7703f1fafadc040123e34dd44e98e7faf8b6dd816e51ed167065b2ffe79e9bcee74564dc324ba2b7dba76f82a'
             'b1f09db04057846e7437b09a10ba38c792cbbbfd7c9fe938237d922ef72c02e0078f6a9542532b41b2f968680d539f766646995dce0a1d11ec7ab1673bc86490'
-            '5bc69c8b560bb4078e62db781698603f3f5a5722c8c1cf9912defed4862c42012db91945d852ff1ca14579f1d2b30a0978d523c35e366171542dc8afa7ef6280')
+            '5bc69c8b560bb4078e62db781698603f3f5a5722c8c1cf9912defed4862c42012db91945d852ff1ca14579f1d2b30a0978d523c35e366171542dc8afa7ef6280'
+            '09925db54171a46483ca1f823a2f60a375faec175dd1d91c312260316ee1b9a615d971bc5833c4007458ea576069f883e5280cd8f0cfc22eb9c8e05008c839f5')
 
 prepare() {
   cd "${srcdir}/${_gemname}-${pkgver}"
@@ -28,7 +29,9 @@
   patch -p1 -N -i "${srcdir}/disable-simplecov.patch"
   # we built based on an archive, not a git repo
   sed --in-place 's/git ls-files/find/' "${_gemname}.gemspec"
-
+  # disable one test that also fails upstream
+  # https://travis-ci.org/github/rack/rack-test/jobs/751430232#L346
+  patch -p1 -N -i "${srcdir}/disable-broken-test.patch"
 }
 
 build() {
@@ -38,8 +41,7 @@
 
 check() {
   cd "${srcdir}/${_gemname}-${pkgver}"
-  # tests currently don't pass because we don't have sinatra in the repos
-  #rake spec
+  rake spec
 }
 
 package() {

Added: disable-broken-test.patch
===================================================================
--- disable-broken-test.patch	                        (rev 0)
+++ disable-broken-test.patch	2021-02-24 19:41:02 UTC (rev 871877)
@@ -0,0 +1,23 @@
+diff --git a/spec/rack/test_spec.rb b/spec/rack/test_spec.rb
+index a073c4d..7d28676 100644
+--- a/spec/rack/test_spec.rb
++++ b/spec/rack/test_spec.rb
+@@ -163,18 +163,6 @@ describe Rack::Test::Session do
+         end
+       end
+ 
+-      it "closes response's body" do
+-        body = CloseableBody.new
+-        expect(body).to receive(:close)
+-
+-        app = lambda do |_env|
+-          [200, { 'Content-Type' => 'text/html', 'Content-Length' => '13' }, body]
+-        end
+-
+-        session = Rack::Test::Session.new(Rack::MockSession.new(app))
+-        session.request('/')
+-      end
+-
+       it "closes response's body after iteration" do
+         app = lambda do |_env|
+           [200, { 'Content-Type' => 'text/html', 'Content-Length' => '13' }, CloseableBody.new]


More information about the arch-commits mailing list