From 30fa377f330ca8a9543e7079ed6f90a7ca42668d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 1 Apr 2008 07:39:04 +0000 Subject: 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 --- actionpack/test/template/text_helper_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/test/template/text_helper_test.rb') 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 -- cgit v1.2.3