File tree Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,20 @@ def setup
10
10
def teardown
11
11
end
12
12
13
- class Foo
14
- include URI ::REGEXP ::PATTERN
15
- end
16
-
17
- def test_fallback_constants
18
- orig_verbose = $VERBOSE
19
- $VERBOSE = nil
13
+ EnvUtil . suppress_warning do
14
+ class Foo
15
+ include URI ::REGEXP ::PATTERN
16
+ end
20
17
21
- assert_raise ( NameError ) { URI ::FOO }
18
+ def test_fallback_constants
19
+ assert_raise ( NameError ) { URI ::FOO }
22
20
23
- assert_equal URI ::ABS_URI , URI ::RFC2396_PARSER . regexp [ :ABS_URI ]
24
- assert_equal URI ::PATTERN , URI ::RFC2396_Parser ::PATTERN
25
- assert_equal URI ::REGEXP , URI ::RFC2396_REGEXP
26
- assert_equal URI ::REGEXP ::PATTERN , URI ::RFC2396_REGEXP ::PATTERN
27
- assert_equal Foo ::IPV4ADDR , URI ::RFC2396_REGEXP ::PATTERN ::IPV4ADDR
28
- ensure
29
- $VERBOSE = orig_verbose
21
+ assert_equal URI ::ABS_URI , URI ::RFC2396_PARSER . regexp [ :ABS_URI ]
22
+ assert_equal URI ::PATTERN , URI ::RFC2396_Parser ::PATTERN
23
+ assert_equal URI ::REGEXP , URI ::RFC2396_REGEXP
24
+ assert_equal URI ::REGEXP ::PATTERN , URI ::RFC2396_REGEXP ::PATTERN
25
+ assert_equal Foo ::IPV4ADDR , URI ::RFC2396_REGEXP ::PATTERN ::IPV4ADDR
26
+ end
30
27
end
31
28
32
29
def test_parser_switch
You can’t perform that action at this time.
0 commit comments