Sha256: 1039d9c3294b4a310a99e7e74aa0beb7471cbd1f73265b51ac9e1c60a9069a54
Contents?: true
Size: 715 Bytes
Versions: 22
Compression:
Stored size: 715 Bytes
Contents
# frozen_string_literal: true require_relative 'website_context' # Learn about best practice specs from http://betterspecs.org RSpec.describe "website", timeout: 120 do include_context "server" let(:spider) {Benchmark::HTTP::Spider.new(depth: 128)} let(:statistics) {Benchmark::HTTP::Statistics.new} it "should be responsive" do Async::HTTP::Client.open(endpoint, connection_limit: 8) do |client| spider.fetch(statistics, client, endpoint.url) do |method, uri, response| if response.failure? Async.logger.error{"#{method} #{uri} -> #{response.status}"} end end.wait end statistics.print expect(statistics.samples).to be_any expect(statistics.failed).to be_zero end end
Version data entries
22 entries across 22 versions & 1 rubygems