mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
9 lines
377 B
Ruby
9 lines
377 B
Ruby
|
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
|