diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-04-01 07:39:04 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-04-01 07:39:04 +0000 |
commit | 30fa377f330ca8a9543e7079ed6f90a7ca42668d (patch) | |
tree | f144908774fcddaeb7148f32ff4564dd11daa891 /actionpack/test/template | |
parent | 300c927b6c99e3a949ce701e680124d0e829a070 (diff) | |
download | rails-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')
-rw-r--r-- | actionpack/test/template/text_helper_test.rb | 8 |
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 |