From 8b33f6689193eec2160d253033d0002dcce6d83a Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 12 Oct 2010 11:08:10 -0700 Subject: test quoting of bigdecimals --- activerecord/test/cases/quoting_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/test') 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 -- cgit v1.2.3