Sha256: 517363a9618fa44850f996f042616a166692037b0d358a8b2e7754ff42686405

Contents?: true

Size: 329 Bytes

Versions: 4

Compression:

Stored size: 329 Bytes

Contents

RSpec::Matchers.define(:request) do |method, url|
  match do |action|
    @stub = stub_request(method, url)
    @stub = @stub.with(@with) unless @with.nil?
    action.call
    expect(@stub).to have_been_requested
  end

  chain(:with) do |options|
    @with = options
  end

  def supports_block_expectations?
    true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
uniqush-rb-0.0.5 spec/support.rb
uniqush-rb-0.0.4 spec/support.rb
uniqush-rb-0.0.3 spec/support.rb
uniqush-rb-0.0.2 spec/support.rb