summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index 7623a8b2609..e4f14449a16 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -219,11 +219,14 @@ class TestBigDecimal < Test::Unit::TestCase
def test_s_new
# TODO: BigDecimal.new will be removed on 1.5
# assert_raise_with_message(NoMethodError, /undefined method `new'/) { BigDecimal.new("1") }
+ verbose, $VERBOSE = $VERBOSE, nil
assert_equal(BigDecimal(1), BigDecimal.new(1))
assert_raise(ArgumentError) { BigDecimal.new(',', exception: true) }
assert_nothing_raised { assert_equal(nil, BigDecimal.new(',', exception: false)) }
assert_raise(TypeError) { BigDecimal.new(nil, exception: true) }
assert_nothing_raised { assert_equal(nil, BigDecimal.new(nil, exception: false)) }
+ ensure
+ $VERBOSE = verbose
end
def _test_mode(type)
@@ -1829,11 +1832,14 @@ class TestBigDecimal < Test::Unit::TestCase
c = Class.new(BigDecimal)
# TODO: BigDecimal.new will be removed on 1.5
# assert_raise_with_message(NoMethodError, /undefined method `new'/) { c.new(1) }
+ verbose, $VERBOSE = $VERBOSE, nil
assert_equal(BigDecimal(1), c.new(1))
assert_raise(ArgumentError) { c.new(',', exception: true) }
assert_nothing_raised { assert_equal(nil, c.new(',', exception: false)) }
assert_raise(TypeError) { c.new(nil, exception: true) }
assert_nothing_raised { assert_equal(nil, c.new(nil, exception: false)) }
+ ensure
+ $VERBOSE = verbose
end
def test_to_d