Sha256: bf53efb52cb14db899597f3d29dff0af3a061a7607c1b7d3c2a51406499b0c61
Contents?: true
Size: 687 Bytes
Versions: 22
Compression:
Stored size: 687 Bytes
Contents
# typed: false # frozen_string_literal: true module Hephaestus module Webmocks module BrowserWebmock def browser_mock(status: 200) browser_mock = Object.new Ferrum::Browser.stubs(:new).returns(browser_mock) browser_mock.stubs(:go_to) browser_mock.stubs(:quit) response_mock = Ferrum::Network::Response.new("", "") response_mock.stubs(:wait_for_idle).returns(true) network_response_mock = Object.new browser_mock.stubs(:network).returns(network_response_mock) network_response_mock.stubs(:response).returns(response_mock) response_mock.stubs(:status).returns(status) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems