Test deprecation warning with $;
This commit is contained in:
parent
c0b8dee95a
commit
03e7b266a7
@ -1111,19 +1111,13 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_warn_deprecated_backwards_compatibility_category
|
def test_warn_deprecated_backwards_compatibility_category
|
||||||
omit "no method to test"
|
(message, category), = capture_warning_warn(category: true) do
|
||||||
|
$; = "www"
|
||||||
|
$; = nil
|
||||||
|
end
|
||||||
|
|
||||||
warning = capture_warning_warn { }
|
assert_include message, 'deprecated'
|
||||||
|
assert_equal :deprecated, category
|
||||||
assert_match(/deprecated/, warning[0])
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_warn_deprecated_category
|
|
||||||
omit "no method to test"
|
|
||||||
|
|
||||||
warning = capture_warning_warn(category: true) { }
|
|
||||||
|
|
||||||
assert_equal :deprecated, warning[0][1]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_kernel_warn_uplevel
|
def test_kernel_warn_uplevel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user