aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Young <alex@bytemark.co.uk>2015-04-20 14:06:19 +0100
committerAlex Young <alex@bytemark.co.uk>2015-04-20 14:06:19 +0100
commit2ec8ca7efdab8b3246ba421ae4e9052702d398db (patch)
tree1bb822d54d311d8e980fcee6064b1257815ac695 /test
parentd92499d23bdb591ecbe824db3064ec4ab5e8f4f5 (diff)
Get tests passing on ruby 2.0.0-p598
Diffstat (limited to 'test')
-rw-r--r--test/tc_mauve_database_peculiarities.rb5
-rw-r--r--test/tc_mauve_sender.rb3
2 files changed, 3 insertions, 5 deletions
diff --git a/test/tc_mauve_database_peculiarities.rb b/test/tc_mauve_database_peculiarities.rb
index 27604a5..ceef9ad 100644
--- a/test/tc_mauve_database_peculiarities.rb
+++ b/test/tc_mauve_database_peculiarities.rb
@@ -7,7 +7,6 @@ require 'mauve/server'
require 'mauve/configuration'
require 'mauve/configuration_builder'
require 'mauve/configuration_builders'
-require 'iconv'
class TcMauveDatabasePeculiarities < Mauve::UnitTest
include Mauve
@@ -43,10 +42,10 @@ EOF
x["fi"] = "Ole hyvä kiirehtiä minulle kannettavan mursu kiillotukseen pakki!"
x["jp"] = "私に私のポータブルセイウチの研磨キットを急いでください!"
- %w(UTF-8 WINDOWS-1252 SHIFT-JIS).each do |enc|
+ %w(UTF-8 WINDOWS-1252 SJIS).each do |enc|
x.each do |lang, str|
assert_nothing_raised("Failed to use iconv to convert to #{enc}") {
- str = Iconv.conv(enc+"//IGNORE", "utf8", str)
+ str = str.encode(enc, :invalid => :replace, :undef => :replace, :replace => '?')
}
alert = Alert.new(
diff --git a/test/tc_mauve_sender.rb b/test/tc_mauve_sender.rb
index 3a98c25..858a7ec 100644
--- a/test/tc_mauve_sender.rb
+++ b/test/tc_mauve_sender.rb
@@ -7,7 +7,6 @@ require 'pp'
require 'timecop'
require 'mauve/sender'
require 'locale'
-require 'iconv'
class TcMauveSender < Test::Unit::TestCase
@@ -29,7 +28,7 @@ class TcMauveSender < Test::Unit::TestCase
# Set up a couple of crazy sources.
#
utf8_source = "Å ðîßtáñt plàñët"
- iso88591_source = Iconv.conv(Locale.current.charset, "UTF-8", utf8_source)
+ iso88591_source = utf8_source.encode(Locale.current.charset)
#
# Make sure our two sources are distinct