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

Version Path
hephaestus-0.7.7.2 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.7 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.6.2 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.6.1 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.6 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.5.3 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.5.2 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.5.1 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.5 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.4.2 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.4.1 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.4 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.3.1 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.3 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.2.5 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.2.4 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.2.3 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.2.2 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.2.1 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb
hephaestus-0.7.2 lib/hephaestus/support/hephaestus/webmocks/browser_webmock.rb