Skip to content

Commit

Permalink
Merge pull request #4334 from lest/remove-obsolete-commented-asserts
Browse files Browse the repository at this point in the history
remove obsolete commented asserts in TextHelper tests
  • Loading branch information
josevalim committed Jan 5, 2012
2 parents 39625d1 + 1c095f2 commit b2b2eb3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions actionpack/test/template/text_helper_test.rb
Expand Up @@ -81,10 +81,6 @@ def test_truncate_with_options_hash
end end


def test_truncate_multibyte def test_truncate_multibyte
# .mb_chars always returns a UTF-8 String.
# assert_equal "\354\225\210\353\205\225\355...",
# truncate("\354\225\210\353\205\225\355\225\230\354\204\270\354\232\224", :length => 10)

assert_equal "\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 ...".force_encoding('UTF-8'), assert_equal "\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 ...".force_encoding('UTF-8'),
truncate("\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 \354\225\204\353\235\274\353\246\254\354\230\244".force_encoding('UTF-8'), :length => 10) truncate("\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 \354\225\204\353\235\274\353\246\254\354\230\244".force_encoding('UTF-8'), :length => 10)
end end
Expand Down Expand Up @@ -231,8 +227,6 @@ def test_excerpt_with_options_hash


def test_excerpt_with_utf8 def test_excerpt_with_utf8
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("...\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))
# .mb_chars always returns UTF-8, even in 1.9. This is not great, but it's how it works. Let's work this out.
# assert_equal("...\203ciency could not be...", excerpt("That's why e\357\254\203ciency could not be helped".force_encoding("BINARY"), 'could', 8))
end end


def test_word_wrap def test_word_wrap
Expand Down

0 comments on commit b2b2eb3

Please sign in to comment.