aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/bigdecimal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/core_ext/bigdecimal.rb')
-rw-r--r--activesupport/test/core_ext/bigdecimal.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/bigdecimal.rb b/activesupport/test/core_ext/bigdecimal.rb
new file mode 100644
index 0000000000..0417a2bca0
--- /dev/null
+++ b/activesupport/test/core_ext/bigdecimal.rb
@@ -0,0 +1,9 @@
+require 'abstract_unit'
+
+class BigDecimalTest < Test::Unit::TestCase
+ def test_to_yaml
+ assert_equal("--- 100000.30020320320000000000000000000000000000001\n", BigDecimal.new('100000.30020320320000000000000000000000000000001').to_yaml)
+ assert_equal("--- .Inf\n", BigDecimal.new('Infinity').to_yaml)
+ assert_equal("--- .NaN\n", BigDecimal.new('NaN').to_yaml)
+ end
+end \ No newline at end of file