Sha256: 3f5e1673582fbbff32fac5d8a694ea51715edcab768de0663b964e8644705df1

Contents?: true

Size: 805 Bytes

Versions: 3

Compression:

Stored size: 805 Bytes

Contents

# -*- encoding : utf-8 -*-
# Fabricators for WebMock objects

Fabricator(:webmock_request_signature, from: WebMock::RequestSignature) do
  initialize_with do
    uri = _transient_attributes[:uri]
    method = _transient_attributes[:method]
    uri = Addressable::URI.heuristic_parse(uri) unless uri.is_a? Addressable::URI
    WebMock::RequestSignature.new method, uri
  end
  transient method: :get
  transient uri: 'www.example.com'
end

Fabricator(:webmock_request_pattern, from: Pacto::RequestPattern) do
  initialize_with do
    uri = _transient_attributes[:uri]
    method = _transient_attributes[:method]
    uri = Addressable::URI.heuristic_parse(uri) unless uri.is_a? Addressable::URI
    Pacto::RequestPattern.new method, uri
  end
  transient method: :get
  transient uri: 'www.example.com'
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pacto-0.4.0.rc3 spec/fabricators/webmock_fabricator.rb
pacto-0.4.0.rc2 spec/fabricators/webmock_fabricator.rb
pacto-0.4.0.rc1 spec/fabricators/webmock_fabricator.rb