aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/text_helper_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-04-01 07:39:04 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-04-01 07:39:04 +0000
commit30fa377f330ca8a9543e7079ed6f90a7ca42668d (patch)
treef144908774fcddaeb7148f32ff4564dd11daa891 /actionpack/test/template/text_helper_test.rb
parent300c927b6c99e3a949ce701e680124d0e829a070 (diff)
downloadrails-30fa377f330ca8a9543e7079ed6f90a7ca42668d.tar.gz
rails-30fa377f330ca8a9543e7079ed6f90a7ca42668d.tar.bz2
rails-30fa377f330ca8a9543e7079ed6f90a7ca42668d.zip
Ruby 1.9 compat: encoding and multibyte test fixes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/text_helper_test.rb')
-rw-r--r--actionpack/test/template/text_helper_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 0cd83334d5..7d92bce4bd 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -136,16 +136,16 @@ class TextHelperTest < Test::Unit::TestCase
if RUBY_VERSION < '1.9'
def test_excerpt_with_utf8
with_kcode('u') do
- assert_equal("...fficiency could not be...", excerpt("That's why efficiency could not be helped", 'could', 8))
+ assert_equal("...\357\254\203ciency could not be...", excerpt("That's why e\357\254\203ciency could not be helped", 'could', 8))
end
with_kcode('none') do
- assert_equal("...\203ciency could not be...", excerpt("That's why efficiency could not be helped", 'could', 8))
+ assert_equal("...\203ciency could not be...", excerpt("That's why e\357\254\203ciency could not be helped", 'could', 8))
end
end
else
def test_excerpt_with_utf8
- assert_equal("...fficiency could not be...".force_encoding('UTF-8'), excerpt("That's why efficiency could not be helped".force_encoding('UTF-8'), 'could', 8))
- assert_equal("...\203ciency could not be...", excerpt("That's why efficiency could not be helped", 'could', 8))
+ assert_equal("...\357\254\203ciency could not be...".force_encoding('UTF-8'), excerpt("That's why e\357\254\203ciency could not be helped".force_encoding('UTF-8'), 'could', 8))
+ assert_equal("...\203ciency could not be...", excerpt("That's why e\357\254\203ciency could not be helped", 'could', 8))
end
end