aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorAntoine Lyset <antoinelyset+github@gmail.com>2013-01-22 22:44:53 +0100
committerAntoine Lyset <antoinelyset+github@gmail.com>2013-01-22 22:46:11 +0100
commitb5245da94a7c7667b57bb2184fa9aa7beb998da6 (patch)
treec0753bc982839bebe38e19afdede45f89051fdff /activesupport/test
parente35d0a6112a73a05fc886b49b6df6ef26d2e3368 (diff)
downloadrails-b5245da94a7c7667b57bb2184fa9aa7beb998da6.tar.gz
rails-b5245da94a7c7667b57bb2184fa9aa7beb998da6.tar.bz2
rails-b5245da94a7c7667b57bb2184fa9aa7beb998da6.zip
Improve String#squish whitespaces matching
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index db1cf14abf..3549331d67 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -223,10 +223,11 @@ class StringInflectionsTest < ActiveSupport::TestCase
end
def test_string_squish
- original = %{ A string with tabs(\t\t), newlines(\n\n), and
- many spaces( ). }
+ original = %{\u180E\u180E A string surrounded by unicode mongolian vowel separators,
+ with tabs(\t\t), newlines(\n\n), unicode nextlines(\u0085\u0085) and many spaces( ). \u180E\u180E}
- expected = "A string with tabs( ), newlines( ), and many spaces( )."
+ expected = "A string surrounded by unicode mongolian vowel separators, " +
+ "with tabs( ), newlines( ), unicode nextlines( ) and many spaces( )."
# Make sure squish returns what we expect:
assert_equal original.squish, expected