Created
August 10, 2009 02:43
-
-
Save eladmeidar/164987 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_truncate_multibyte_with_seperator | |
with_kcode 'none' do | |
assert_equal "אלעד ...", truncate("אלעד אוכל גזר כתום", :seperator => ' ', :length => 12) | |
end | |
with_kcode 'u' do | |
assert_equal "אלעד ...", | |
truncate("אלעד אוכלת גזר כתום", :length => 10, :seperator => ' ') | |
end | |
end | |
1) Failure: | |
test_truncate_multibyte_with_seperator(TextHelperTest) | |
[./test/template/text_helper_test.rb:77:in `test_truncate_multibyte_with_seperator' | |
./test/testing_sandbox.rb:7:in `with_kcode' | |
./test/template/text_helper_test.rb:76:in `test_truncate_multibyte_with_seperator' | |
./test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__' | |
./test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run']: | |
<"אלעד ..."> expected but was | |
<"אלעד או...">. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment