Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 885647 Details for
Bug 1086952
support minitest 5
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
minitest 5 (git format-patch, against master)
0001-minitest-5-support.patch (text/plain), 5.11 KB, created by
Ken Dreyer
on 2014-04-12 03:56:13 UTC
(
hide
)
Description:
minitest 5 (git format-patch, against master)
Filename:
MIME Type:
Creator:
Ken Dreyer
Created:
2014-04-12 03:56:13 UTC
Size:
5.11 KB
patch
obsolete
>From 22cde56ee74d7b18d81610d5794ca134ba1f80d3 Mon Sep 17 00:00:00 2001 >From: Ken Dreyer <ktdreyer@ktdreyer.com> >Date: Fri, 11 Apr 2014 18:03:31 -0600 >Subject: [PATCH] minitest 5 support > >--- > rubygem-charlock_holmes-0.6.9.4-minitest.patch | 92 ++++++++++++++++++++++++++ > rubygem-charlock_holmes.spec | 11 ++- > 2 files changed, 101 insertions(+), 2 deletions(-) > create mode 100644 rubygem-charlock_holmes-0.6.9.4-minitest.patch > >diff --git a/rubygem-charlock_holmes-0.6.9.4-minitest.patch b/rubygem-charlock_holmes-0.6.9.4-minitest.patch >new file mode 100644 >index 0000000..c8ef4f7 >--- /dev/null >+++ b/rubygem-charlock_holmes-0.6.9.4-minitest.patch >@@ -0,0 +1,92 @@ >+From 84eeab6bf2971e7f399d1a2f399b89db2499161f Mon Sep 17 00:00:00 2001 >+From: Ken Dreyer <ktdreyer@ktdreyer.com> >+Date: Fri, 11 Apr 2014 17:44:31 -0600 >+Subject: [PATCH] tests: switch to minitest >+ >+Adjust the test suite to support Minitest 5's syntax. >+ >+Minitest versions 4 and below do not support the newer Minitest::Test >+class that arrived in version 5. For that case, use the >+MiniTest::Unit::TestCase class as a fallback. >+--- >+ test/converter_test.rb | 2 +- >+ test/encoding_detector_test.rb | 2 +- >+ test/helper.rb | 7 +++++++ >+ test/string_methods_test.rb | 2 +- >+ test/transliterator_test.rb | 2 +- >+ 5 files changed, 11 insertions(+), 4 deletions(-) >+ >+diff --git a/test/converter_test.rb b/test/converter_test.rb >+index 937cbb4..d84b628 100644 >+--- a/test/converter_test.rb >++++ b/test/converter_test.rb >+@@ -1,7 +1,7 @@ >+ # encoding: utf-8 >+ require File.expand_path("../helper", __FILE__) >+ >+-class ConverterTest < MiniTest::Unit::TestCase >++class ConverterTest < MiniTest::Test >+ def test_convert_ascii_from_iso859_1_to_utf16_and_back >+ input = 'test' >+ >+diff --git a/test/encoding_detector_test.rb b/test/encoding_detector_test.rb >+index 25c4f66..f8f7bd9 100644 >+--- a/test/encoding_detector_test.rb >++++ b/test/encoding_detector_test.rb >+@@ -1,7 +1,7 @@ >+ # encoding: utf-8 >+ require File.expand_path("../helper", __FILE__) >+ >+-class EncodingDetectorTest < MiniTest::Unit::TestCase >++class EncodingDetectorTest < MiniTest::Test >+ def setup >+ @detector = CharlockHolmes::EncodingDetector.new >+ end >+diff --git a/test/helper.rb b/test/helper.rb >+index e3e3583..17445a7 100644 >+--- a/test/helper.rb >++++ b/test/helper.rb >+@@ -9,6 +9,13 @@ require 'charlock_holmes' >+ # bring in minitest >+ require 'minitest/autorun' >+ >++if Minitest.const_defined?('Test') >++ # We're on Minitest 5+. Nothing to do here. >++else >++ # Minitest 4 doesn't have Minitest::Test yet. >++ Minitest::Test = MiniTest::Unit::TestCase >++end >++ >+ # put lib and test dirs directly on load path >+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) >+ $LOAD_PATH.unshift File.expand_path('..', __FILE__) >+\ No newline at end of file >+diff --git a/test/string_methods_test.rb b/test/string_methods_test.rb >+index aea09db..2ee0130 100644 >+--- a/test/string_methods_test.rb >++++ b/test/string_methods_test.rb >+@@ -1,7 +1,7 @@ >+ require File.expand_path("../helper", __FILE__) >+ require 'charlock_holmes/string' >+ >+-class StringMethodsTest < MiniTest::Unit::TestCase >++class StringMethodsTest < MiniTest::Test >+ def test_adds_detect_encoding_method >+ str = 'test' >+ str.respond_to? :detect_encoding >+diff --git a/test/transliterator_test.rb b/test/transliterator_test.rb >+index 9e86c32..87da8a9 100644 >+--- a/test/transliterator_test.rb >++++ b/test/transliterator_test.rb >+@@ -1,7 +1,7 @@ >+ # encoding: utf-8 >+ require File.expand_path("../helper", __FILE__) >+ >+-class TransliteratorTest < MiniTest::Unit::TestCase >++class TransliteratorTest < MiniTest::Test >+ DONT_CONVERT = [ >+ "Vitrum edere possum; mihi non nocet.", # Latin >+ "Je puis mangier del voirre. Ne me nuit.", # Old French >+-- >+1.9.0 >+ >diff --git a/rubygem-charlock_holmes.spec b/rubygem-charlock_holmes.spec >index dcb08c6..a998fb0 100644 >--- a/rubygem-charlock_holmes.spec >+++ b/rubygem-charlock_holmes.spec >@@ -9,11 +9,14 @@ Group: Development/Languages > License: MIT > URL: http://github.com/brianmario/charlock_holmes > Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem >+# Minitest 5 support >+# https://github.com/brianmario/charlock_holmes/pull/62 >+Patch0: rubygem-charlock_holmes-0.6.9.4-minitest.patch > BuildRequires: ruby(release) > BuildRequires: rubygems-devel > BuildRequires: ruby-devel > BuildRequires: libicu-devel >-BuildRequires: rubygem(minitest) < 5 >+BuildRequires: rubygem(minitest) > > # The Python code in the tests subdirectory references /usr/bin/env. > # Filter this from RPM's autorequires. >@@ -38,6 +41,10 @@ gem unpack %{SOURCE0} > > gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec > >+# Minitest 5 support >+# https://github.com/brianmario/charlock_holmes/pull/62 >+%patch0 -p1 >+ > # Remove unecessary bundler dependency > sed -i '/bundler/d' test/helper.rb > >@@ -68,7 +75,7 @@ pushd .%{gem_instdir} > # Set locale to UTF due to failing tests in mock > # https://github.com/brianmario/charlock_holmes/issues/39 > LANG=en_US.utf8 >-testrb -I%{buildroot}%{gem_extdir_mri} test/*.rb >+ruby -I"lib:%{buildroot}%{gem_extdir_mri}" -e 'Dir.glob "./test/*_test.rb", &method(:require)' > popd > > %files >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1086952
: 885647