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
1010 def teardown
1111 end
1212
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
2017
21- assert_raise ( NameError ) { URI ::FOO }
18+ def test_fallback_constants
19+ assert_raise ( NameError ) { URI ::FOO }
2220
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
3027 end
3128
3229 def test_parser_switch
You can’t perform that action at this time.
0 commit comments