File: disabling_stub.rb

package info (click to toggle)
ruby-faraday 2.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,008 kB
  • sloc: ruby: 6,509; sh: 10; makefile: 8
file content (14 lines) | stat: -rw-r--r-- 205 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

# Allows to disable WebMock stubs
module DisablingStub
  def disable
    @disabled = true
  end

  def disabled?
    @disabled
  end

  WebMock::RequestStub.prepend self
end