[DRE-commits] [ruby-mono-logger] 02/03: Make tests run
Balasankar C
balasankarc-guest at moszumanska.debian.org
Tue Jul 7 15:50:49 UTC 2015
This is an automated email from the git hooks/post-receive script.
balasankarc-guest pushed a commit to branch master
in repository ruby-mono-logger.
commit 1ca421d8eb88a4faacc5a09b097f07a2fa3c1818
Author: Balasankar C <balasankarc at autistici.org>
Date: Tue Jul 7 21:20:24 2015 +0530
Make tests run
---
debian/patches/minitest | 70 +++++++++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/ruby-tests.rake | 2 +-
3 files changed, 72 insertions(+), 1 deletion(-)
diff --git a/debian/patches/minitest b/debian/patches/minitest
new file mode 100644
index 0000000..9e9911f
--- /dev/null
+++ b/debian/patches/minitest
@@ -0,0 +1,70 @@
+Description: Fix minitest tests
+ Fix minitest tests to support RSpec 3
+Author: Balasankar C <balasankarc at autistici.org>
+Last-Update: 2015-07-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/test/mri_logger_test.rb
++++ b/test/mri_logger_test.rb
+@@ -1,12 +1,12 @@
+ # coding: US-ASCII
+-require 'test/unit'
++require 'minitest/autorun'
+ require 'mono_logger'
+ require 'tempfile'
++require 'logger-application'
++Logger ||= MonoLogger
+
+-Logger = MonoLogger
+
+-
+-class TestLoggerSeverity < Test::Unit::TestCase
++class TestLoggerSeverity < Minitest::Test
+ def test_enum
+ logger_levels = Logger.constants
+ levels = ["WARN", "UNKNOWN", "INFO", "FATAL", "DEBUG", "ERROR"]
+@@ -19,7 +19,7 @@
+ end
+
+
+-class TestLogger < Test::Unit::TestCase
++class TestLogger < Minitest::Test
+ include Logger::Severity
+
+ def setup
+@@ -260,7 +260,7 @@
+ end
+ end
+
+-class TestLogDevice < Test::Unit::TestCase
++class TestLogDevice < Minitest::Test
+ class LogExcnRaiser
+ def write(*arg)
+ raise 'disk is full'
+@@ -333,14 +333,9 @@
+ alias write <<
+ end
+ $stderr, stderr = stderr, $stderr
+- begin
+- assert_nothing_raised do
+- logdev.write('hello')
+- end
+- ensure
+- logdev.close
+- $stderr, stderr = stderr, $stderr
+- end
++ logdev.write('hello')
++ logdev.close
++ $stderr, stderr = stderr, $stderr
+ assert_equal "log writing failed. disk is full\n", stderr
+ end
+
+@@ -481,7 +476,7 @@
+ end
+
+
+-class TestLoggerApplication < Test::Unit::TestCase
++class TestLoggerApplication < Minitest::Test
+ def setup
+ @app = Logger::Application.new('appname')
+ @tempfile = Tempfile.new("logger")
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1738eaa
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+minitest
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
index 45796dd..46972d3 100644
--- a/debian/ruby-tests.rake
+++ b/debian/ruby-tests.rake
@@ -2,6 +2,6 @@
require 'gem2deb/rake/testtask'
Gem2Deb::Rake::TestTask.new do |t|
- t.libs << 'test'
+ t.libs << 'lib' << 'test'
t.test_files = FileList['test/*_test.rb']
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mono-logger.git
More information about the Pkg-ruby-extras-commits
mailing list