# File test/test_redirect.rb, line 210 def test_URL_and_not_found redirect = @RegexpRedirectDocument.new(%r"^.*/bar*?$", 'http://www.foo.bar/index.html') @request.method = 'GET' @request.path = '/baz' @request.version = 'HTTP/1.1' done = false begin redirect.publish('', @request, @response, @logger) rescue Rucy::HTTPError assert_equal(404, $!.status) # Not Found done = true end assert(done) assert(@messg_body.empty?) end