aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-08-28 03:07:34 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-08-28 03:07:34 -0300
commit93a4dfaebc48e3324997be780539fad996349c84 (patch)
treef889ee6897b455120356f64505579c5864d15dd3 /activesupport/test
parent3cc7b0a239c66af39acc979d9afa9e7c593c1f4b (diff)
parent7f23c5d52438f12d7af167a399a77025b1d58a9c (diff)
downloadrails-93a4dfaebc48e3324997be780539fad996349c84.tar.gz
rails-93a4dfaebc48e3324997be780539fad996349c84.tar.bz2
rails-93a4dfaebc48e3324997be780539fad996349c84.zip
Merge pull request #17502 from vipulnsward/configurable-delimited-regex
Support for custom regular expression for number_to_delimeted
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/number_helper_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/test/number_helper_test.rb b/activesupport/test/number_helper_test.rb
index cb5230c4eb..944bce1b41 100644
--- a/activesupport/test/number_helper_test.rb
+++ b/activesupport/test/number_helper_test.rb
@@ -106,6 +106,7 @@ module ActiveSupport
assert_equal("123,456,789.78901", number_helper.number_to_delimited(123456789.78901))
assert_equal("0.78901", number_helper.number_to_delimited(0.78901))
assert_equal("123,456.78", number_helper.number_to_delimited("123456.78"))
+ assert_equal("1,23,456.78", number_helper.number_to_delimited("123456.78", delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/))
assert_equal("123,456.78", number_helper.number_to_delimited("123456.78".html_safe))
end
end