summaryrefslogtreecommitdiff
path: root/test/test_cmath.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_cmath.rb')
-rw-r--r--test/test_cmath.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/test_cmath.rb b/test/test_cmath.rb
index b3692bc7cf..c603cd2bbe 100644
--- a/test/test_cmath.rb
+++ b/test/test_cmath.rb
@@ -4,13 +4,11 @@ require 'cmath'
class TestCMath < Test::Unit::TestCase
def test_deprecated_method
- orig = $VERBOSE
- $VERBOSE = true
+ root = nil
assert_warning(/CMath#sqrt! is deprecated; use CMath#sqrt or Math#sqrt/) do
- CMath.sqrt!(1)
+ root = CMath.sqrt!(1)
end
- assert_equal CMath.sqrt(1), CMath.sqrt!(1)
- $VERBOSE = orig
+ assert_equal CMath.sqrt(1), root
end
def test_sqrt