aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-10-12 11:08:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-10-12 11:08:10 -0700
commit8b33f6689193eec2160d253033d0002dcce6d83a (patch)
treeeb2bca68736ea09c6e1682bb1b42aa530c2da79d /activerecord/test
parentba0a6772bba983338562b1e305d90fcec4293007 (diff)
downloadrails-8b33f6689193eec2160d253033d0002dcce6d83a.tar.gz
rails-8b33f6689193eec2160d253033d0002dcce6d83a.tar.bz2
rails-8b33f6689193eec2160d253033d0002dcce6d83a.zip
test quoting of bigdecimals
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/quoting_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/quoting_test.rb b/activerecord/test/cases/quoting_test.rb
index 989c25a708..cb34db1c7e 100644
--- a/activerecord/test/cases/quoting_test.rb
+++ b/activerecord/test/cases/quoting_test.rb
@@ -128,6 +128,12 @@ module ActiveRecord
assert_equal bignum.to_s, @quoter.quote(bignum, nil)
assert_equal bignum.to_s, @quoter.quote(bignum, Object.new)
end
+
+ def test_quote_bigdecimal
+ bigdec = BigDecimal.new((1 << 100).to_s)
+ assert_equal bigdec.to_s('F'), @quoter.quote(bigdec, nil)
+ assert_equal bigdec.to_s('F'), @quoter.quote(bigdec, Object.new)
+ end
end
end
end