Sha256: e713a9034b90ecf7991a79376bf4d0b63ee9dcfc237d76f9e9e5159c75cdbde3

Contents?: true

Size: 404 Bytes

Versions: 41

Compression:

Stored size: 404 Bytes

Contents

require 'webmock/minitest'

class WebMock::RequestStub
  def to_return_json(hash, options = {})
    options[:body] = MultiJson.dump(hash)
    to_return(options)
  end
end

# Don't raise but report uncaught net connections
WebMock.allow_net_connect!
WebMock.stub_request(:any, /.*/).to_return do |request|
  puts "\e[35mUNSTUBBED REQUEST:\e[0m #{request.method.upcase} #{request.uri}"
  { body: nil }
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
spyke-7.2.2 test/support/webmock.rb
spyke-7.1.1 test/support/webmock.rb
spyke-7.1.0 test/support/webmock.rb
spyke-7.0.0 test/support/webmock.rb
spyke-6.1.3 test/support/webmock.rb
spyke-6.1.2 test/support/webmock.rb
spyke-6.1.1 test/support/webmock.rb
spyke-6.1.0 test/support/webmock.rb
spyke-6.0.0 test/support/webmock.rb
spyke-5.4.3 test/support/webmock.rb
spyke-5.4.2 test/support/webmock.rb
spyke-5.4.1 test/support/webmock.rb
spyke-5.4.0 test/support/webmock.rb
spyke-5.3.4 test/support/webmock.rb
spyke-5.3.3 test/support/webmock.rb
spyke-5.3.2 test/support/webmock.rb
spyke-5.3.1 test/support/webmock.rb
spyke-5.3.0 test/support/webmock.rb
spyke-5.2.0 test/support/webmock.rb
spyke-5.1.0 test/support/webmock.rb