Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Generic webmock methods inside spec_helper.rb for rspec tests

View webmock_helpers.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# inside spec_helper.rb
def enable_http_request
WebMock.reset!
WebMock.allow_net_connect!
end
def disable_http_request
WebMock.reset!
WebMock.disable_net_connect!
end
 
# usage inside your own spec files
 
# before do
# enable_http_request
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.