rubygem-unf/rubygem-unf-0.2.0-Use-test-unit-.patch

41 lines
1.4 KiB
Diff

From c3987f7942bdde5268ec293834ba3b3447217752 Mon Sep 17 00:00:00 2001
From: Akinori MUSHA <knu@idaemons.org>
Date: Thu, 16 Apr 2015 12:17:01 +0900
Subject: [PATCH] Use test-unit.
---
test/helper.rb | 1 -
test/test_unf.rb | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/test/helper.rb b/test/helper.rb
index 7321a5a..6b21ea5 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -8,7 +8,6 @@
exit e.status_code
end
require 'test/unit'
-require 'shoulda'
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
diff --git a/test/test_unf.rb b/test/test_unf.rb
index b71e5a0..5281033 100644
--- a/test/test_unf.rb
+++ b/test/test_unf.rb
@@ -3,12 +3,12 @@
require 'pathname'
class TestUNF < Test::Unit::TestCase
- should "raise ArgumentError if an unknown normalization form is given" do
+ test "raise ArgumentError if an unknown normalization form is given" do
normalizer = UNF::Normalizer.instance
assert_raises(ArgumentError) { normalizer.normalize("が", :nfck) }
end
- should "pass all tests bundled with the original unf" do
+ test "pass all tests bundled with the original unf" do
normalizer = UNF::Normalizer.instance
open(Pathname(__FILE__).dirname + 'normalization-test.txt', 'r:utf-8').each_slice(6) { |lines|
flunk "broken test file" if lines.size != 6 || lines.pop !~ /^$/