class WebMock::Stub

Defined in:

webmock/stub.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(method : Symbol | String, uri : String | Regex) #

[View source]

Instance Method Detail

def calls : Int32 #

[View source]
def exec(request) #

[View source]
def matches?(request) #

[View source]
def matches_body?(request) #

[View source]
def matches_headers?(request) #

[View source]
def matches_host?(request, uri) #

[View source]
def matches_method?(request) #

[View source]
def matches_path?(request, uri) #

[View source]
def matches_scheme?(request, uri) #

[View source]
def matches_uri?(request) #

[View source]
def to_return(body : String | Nil = "", status : Int32 = 200, headers = nil) #

[View source]
def to_return(body_io : IO, status : Int32 = 200, headers = nil) #

[View source]
def to_return(&block : HTTP::Request -> HTTP::Client::Response) #

[View source]
def with(query : Hash(String, String) | Nil = nil, body : String | Nil = nil, headers = nil) #

[View source]