aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/string_ext_test.rb
diff options
context:
space:
mode:
authorDamien Mathieu <42@dmathieu.com>2011-07-03 13:09:28 +0200
committerDamien Mathieu <42@dmathieu.com>2011-07-03 13:09:46 +0200
commitb7327241aa01d570817edd2274d48ffd9451ddcd (patch)
tree438fd6a4fcb4d0602387c07974a443a3221017b4 /activesupport/test/core_ext/string_ext_test.rb
parenta1d85a03bd0541faafff43973698df4a9e4973f2 (diff)
downloadrails-b7327241aa01d570817edd2274d48ffd9451ddcd.tar.gz
rails-b7327241aa01d570817edd2274d48ffd9451ddcd.tar.bz2
rails-b7327241aa01d570817edd2274d48ffd9451ddcd.zip
all numerics should be html_safe - Closes #1935
Diffstat (limited to 'activesupport/test/core_ext/string_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index 7a8cda160d..0360cf2901 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -353,6 +353,10 @@ class OutputSafetyTest < ActiveSupport::TestCase
test "A fixnum is safe by default" do
assert 5.html_safe?
end
+
+ test "a float is safe by default" do
+ assert 5.7.html_safe?
+ end
test "An object is unsafe by default" do
assert !@object.html_safe?