Sha256: 2a73e403eef82c44e4f33a29b790a2b444758ed5495b4adde3429492aea3cd16
Contents?: true
Size: 827 Bytes
Versions: 6
Compression:
Stored size: 827 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) require 'webrick' class ::WEBrick::HTTPServer ; def access_log(config, req, res) ; end ; end class ::WEBrick::BasicLog ; def log(level, data) ; end ; end class BugCrashOnDebug < Test::Unit::TestCase def test_on_debug server = WEBrick::HTTPServer.new( :Port => 9999 ) server.mount_proc("/test") do|req,res| res.body = "hi" res['Content-Type'] = "text/html" end thread = Thread.new(server) do|srv| srv.start end c = Curl::Easy.new('http://localhost:9999/test') c.on_progress do|x| raise "error" end c.perform assert false, "should not reach this point" rescue => e assert_equal 'Curl::Err::AbortedByCallbackError', e.class.to_s c.close ensure server.shutdown end end
Version data entries
6 entries across 6 versions & 2 rubygems