[DRE-commits] [ruby-test-declarative] 02/06: Drop 0001-Add-support-for-Minitest-5.patch (no longer needed)

Lucas Nussbaum lucas at moszumanska.debian.org
Thu Jul 6 18:51:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

lucas pushed a commit to branch master
in repository ruby-test-declarative.

commit b1e7ade6f0a325dd2985a206c44dbb27987e19f3
Author: Lucas Nussbaum <lucas at debian.org>
Date:   Thu Jul 6 20:38:31 2017 +0200

    Drop 0001-Add-support-for-Minitest-5.patch (no longer needed)
---
 .../patches/0001-Add-support-for-Minitest-5.patch  | 80 ----------------------
 debian/patches/series                              |  1 -
 2 files changed, 81 deletions(-)

diff --git a/debian/patches/0001-Add-support-for-Minitest-5.patch b/debian/patches/0001-Add-support-for-Minitest-5.patch
deleted file mode 100644
index 41b472e..0000000
--- a/debian/patches/0001-Add-support-for-Minitest-5.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From d8e7d89b0090dd569dc8c94f3541b7c2390ab5b5 Mon Sep 17 00:00:00 2001
-From: Josef Stribny <jstribny at redhat.com>
-Date: Mon, 19 Jan 2015 18:28:42 +0100
-Subject: [PATCH] Add support for Minitest >=5
-
-(Fetched from https://github.com/strzibny/test_declarative/tree/d8e7d89b0090dd569dc8c94f3541b7c2390ab5b5
-referenced in https://github.com/svenfuchs/test_declarative/pull/4)
-
-- add Minitest 5 support
-- change tests to work with both test/unit (if available) and Minitest 5
-- fix the test suite on Ruby 1.8.7 by explicitely requiring test/unit/testresult
----
- lib/test_declarative.rb       |  1 +
- test/test_declarative_test.rb | 37 ++++++++++++++++++++++++++++++++-----
- test_declarative.gemspec      |  1 +
- 3 files changed, 34 insertions(+), 5 deletions(-)
-
---- a/lib/test_declarative.rb
-+++ b/lib/test_declarative.rb
-@@ -1,6 +1,7 @@
- targets = [Module]
- targets << Test::Unit::TestCase     if defined?(Test::Unit::TestCase)
- targets << MiniTest::Unit::TestCase if defined?(MiniTest::Unit::TestCase)
-+targets << Minitest::Test           if defined?(Minitest::Test)
- 
- targets.each do |target|
-   target.class_eval do
---- a/test/test_declarative_test.rb
-+++ b/test/test_declarative_test.rb
-@@ -1,17 +1,44 @@
- $: << File.expand_path('../../lib', __FILE__)
- 
--require 'test/unit'
-+# Test with test/unit for older Rubies
-+begin
-+  require 'test/unit'
-+  require 'test/unit/testresult'
-+  if RUBY_VERSION < '1.9.1'
-+    # test/unit
-+    TEST_CASE = Test::Unit::TestCase
-+    RUNNER = Test::Unit::TestResult
-+    MINITEST_5 = false
-+  else
-+    # Minitest < 5
-+    TEST_CASE = Test::Unit::TestCase
-+    RUNNER = MiniTest::Unit
-+    MINITEST_5 = false
-+  end
-+rescue LoadError, StandardError
-+  # Minitest >= 5
-+  require 'minitest/autorun'
-+  TEST_CASE = Minitest::Test
-+  RUNNER = Minitest::Unit
-+  MINITEST_5 = true
-+end
-+
- require 'test_declarative'
- 
--class TestDeclarativeTest < Test::Unit::TestCase
-+class TestDeclarativeTest < TEST_CASE
-   def test_responds_to_test
-     assert self.class.respond_to?(:test)
-   end
-   
-   def test_adds_a_test_method
-     called = false
--    assert_nothing_raised { Test::Unit::TestCase.test('some test') { called = true } }
--    Test::Unit::TestCase.new(:'test_some_test').run((RUBY_VERSION < '1.9.1' ? Test::Unit::TestResult : MiniTest::Unit).new) {}
-+    TEST_CASE.test('some test') { called = true }
-+    case MINITEST_5
-+    when false
-+      TEST_CASE.new(:'test_some_test').run(RUNNER.new) {}
-+    when true
-+      TEST_CASE.new(:'test_some_test').run() {}
-+    end
-     assert called
-   end
--end
-\ No newline at end of file
-+end
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index b4a7f32..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-0001-Add-support-for-Minitest-5.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-test-declarative.git



More information about the Pkg-ruby-extras-commits mailing list