# File lib/em-http/mock.rb, line 60 def send_request(&blk) query = "#{@uri.scheme}://#{@uri.host}:#{@uri.port}#{encode_query(@uri.path, @options[:query], @uri.query)}" if s = @@registry[query] and fake = s[@method] @@registry_count[query][@method] += 1 client = FakeHttpClient.new(nil) client.setup(fake, @uri) client elsif @@pass_through_requests real_send_request else raise "this request #{query} for method #{@method} isn't registered, and pass_through_requests is current set to false" end end