aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2013-01-28 13:24:56 -0800
committerXavier Noria <fxn@hashref.com>2013-01-28 13:24:56 -0800
commit30034dfbc4beda97fb182fa9bda317a7c3b6615d (patch)
treefc91a1924869c78c1b0f717e384872aaac4ca914 /activesupport/test/core_ext
parent764397f17d4140232c1aa62bc593b3e5f25485e7 (diff)
parentb5245da94a7c7667b57bb2184fa9aa7beb998da6 (diff)
downloadrails-30034dfbc4beda97fb182fa9bda317a7c3b6615d.tar.gz
rails-30034dfbc4beda97fb182fa9bda317a7c3b6615d.tar.bz2
rails-30034dfbc4beda97fb182fa9bda317a7c3b6615d.zip
Merge pull request #8830 from antoinelyset/master
Improve String#squish whitespaces matching
Diffstat (limited to 'activesupport/test/core_ext')
-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 68918b040f..bff155f045 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -229,10 +229,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