aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-10 15:43:21 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-10 15:51:37 -0800
commit1cc556dc5263bbbe5845b9a7abde9c84dffa7fb0 (patch)
treefb72fab8e7d7f2f4fc5d5b4f854447fe8b1b2dd0 /activesupport/test/core_ext
parentf4f4964ce0a05cac38bbff3b308ac558228bad29 (diff)
downloadrails-1cc556dc5263bbbe5845b9a7abde9c84dffa7fb0.tar.gz
rails-1cc556dc5263bbbe5845b9a7abde9c84dffa7fb0.tar.bz2
rails-1cc556dc5263bbbe5845b9a7abde9c84dffa7fb0.zip
adding to_d to BigDecimal
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/bigdecimal_test.rb (renamed from activesupport/test/core_ext/bigdecimal.rb)7
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/bigdecimal.rb b/activesupport/test/core_ext/bigdecimal_test.rb
index 9faad9146f..0272f564de 100644
--- a/activesupport/test/core_ext/bigdecimal.rb
+++ b/activesupport/test/core_ext/bigdecimal_test.rb
@@ -7,4 +7,9 @@ class BigDecimalTest < Test::Unit::TestCase
assert_equal("--- .NaN\n", BigDecimal.new('NaN').to_yaml)
assert_equal("--- -.Inf\n", BigDecimal.new('-Infinity').to_yaml)
end
-end \ No newline at end of file
+
+ def test_to_d
+ bd = BigDecimal.new '10'
+ assert_equal bd, bd.to_d
+ end
+end