From ea2f85a834d754d7de0ec2e656e9312005413d5c Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Jun 18 2014 09:28:14 +0000 Subject: Add minitest5 patch --- diff --git a/rubygem-i18n-0.6.10-minitest5.patch b/rubygem-i18n-0.6.10-minitest5.patch new file mode 100644 index 0000000..a99a317 --- /dev/null +++ b/rubygem-i18n-0.6.10-minitest5.patch @@ -0,0 +1,44 @@ +diff --git a/test/test_helper.rb b/test/test_helper.rb +index 53f34aa..d24b81f 100644 +--- a/test/test_helper.rb ++++ b/test/test_helper.rb +@@ -1,7 +1,25 @@ + $KCODE = 'u' if RUBY_VERSION <= '1.9' + + require 'rubygems' +-require 'test/unit' ++ ++# Use minitest if we can, otherwise fallback to test-unit. ++begin ++ require 'minitest/autorun' ++ TEST_CASE = defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase ++ ++ # TODO: Remove these aliases and update tests accordingly. ++ class TEST_CASE ++ alias :assert_raise :assert_raises ++ alias :assert_not_equal :refute_equal ++ ++ def assert_nothing_raised(*args) ++ yield ++ end ++ end ++rescue LoadError ++ require 'test/unit' ++ TEST_CASE = Test::Unit::TestCase ++end + + # Do not load the i18n gem from libraries like active_support. + # +@@ -17,7 +35,7 @@ + require 'mocha' + require 'test_declarative' + +-class Test::Unit::TestCase ++class I18n::TestCase < TEST_CASE + def teardown + I18n.locale = nil + I18n.default_locale = :en +-- +1.9.3 + +