test/rubygems/test_gem_request.rb in rubygems-update-3.1.6 vs test/rubygems/test_gem_request.rb in rubygems-update-3.2.0.rc.1

- old
+ new

@@ -249,26 +249,26 @@ end def test_user_agent ua = make_request(@uri, nil, nil, nil).user_agent - assert_match %r%^RubyGems/\S+ \S+ Ruby/\S+ \(.*?\)%, ua - assert_match %r%RubyGems/#{Regexp.escape Gem::VERSION}%, ua - assert_match %r% #{Regexp.escape Gem::Platform.local.to_s} %, ua - assert_match %r%Ruby/#{Regexp.escape RUBY_VERSION}%, ua - assert_match %r%\(#{Regexp.escape RUBY_RELEASE_DATE} %, ua + assert_match %r{^RubyGems/\S+ \S+ Ruby/\S+ \(.*?\)}, ua + assert_match %r{RubyGems/#{Regexp.escape Gem::VERSION}}, ua + assert_match %r{ #{Regexp.escape Gem::Platform.local.to_s} }, ua + assert_match %r{Ruby/#{Regexp.escape RUBY_VERSION}}, ua + assert_match %r{\(#{Regexp.escape RUBY_RELEASE_DATE} }, ua end def test_user_agent_engine util_save_version Object.send :remove_const, :RUBY_ENGINE Object.send :const_set, :RUBY_ENGINE, 'vroom' ua = make_request(@uri, nil, nil, nil).user_agent - assert_match %r%\) vroom%, ua + assert_match %r{\) vroom}, ua ensure util_restore_version end def test_user_agent_engine_ruby @@ -277,11 +277,11 @@ Object.send :remove_const, :RUBY_ENGINE Object.send :const_set, :RUBY_ENGINE, 'ruby' ua = make_request(@uri, nil, nil, nil).user_agent - assert_match %r%\)%, ua + assert_match %r{\)}, ua ensure util_restore_version end def test_user_agent_patchlevel @@ -290,11 +290,11 @@ Object.send :remove_const, :RUBY_PATCHLEVEL Object.send :const_set, :RUBY_PATCHLEVEL, 5 ua = make_request(@uri, nil, nil, nil).user_agent - assert_match %r% patchlevel 5\)%, ua + assert_match %r{ patchlevel 5\)}, ua ensure util_restore_version end def test_user_agent_revision @@ -305,12 +305,12 @@ Object.send :remove_const, :RUBY_REVISION if defined?(RUBY_REVISION) Object.send :const_set, :RUBY_REVISION, 6 ua = make_request(@uri, nil, nil, nil).user_agent - assert_match %r% revision 6\)%, ua - assert_match %r%Ruby/#{Regexp.escape RUBY_VERSION}dev%, ua + assert_match %r{ revision 6\)}, ua + assert_match %r{Ruby/#{Regexp.escape RUBY_VERSION}dev}, ua ensure util_restore_version end def test_user_agent_revision_missing @@ -320,10 +320,10 @@ Object.send :const_set, :RUBY_PATCHLEVEL, -1 Object.send :remove_const, :RUBY_REVISION if defined?(RUBY_REVISION) ua = make_request(@uri, nil, nil, nil).user_agent - assert_match %r%\(#{Regexp.escape RUBY_RELEASE_DATE}\)%, ua + assert_match %r{\(#{Regexp.escape RUBY_RELEASE_DATE}\)}, ua ensure util_restore_version end def test_verify_certificate