Net::HTTP
Last updated
Last updated
There are many ways to use Net::HTTP. The scenarios below provide regression tests for some Net::HTTP APIs that have not worked properly with VCR and WebMock in the past (but have since been fixed).
Given a file named "vcr_setup.rb" with:
Given a file named "vcr_net_http.rb" with:
When I run ruby vcr_net_http.rb --with-server
Then the output should contain "VCR works with Net::HTTP posts!"
And the file "cassettes/net_http.yml" should contain "VCR works with Net::HTTP posts!"
When I run ruby vcr_net_http.rb
Then the output should contain "VCR works with Net::HTTP posts!".
Given a file named "vcr_net_http.rb" with:
When I run ruby vcr_net_http.rb --with-server
Then the output should contain "VCR works with Net::HTTP gets!"
And the file "cassettes/net_http.yml" should contain "VCR works with Net::HTTP gets!"
When I run ruby vcr_net_http.rb
Then the output should contain "VCR works with Net::HTTP gets!".
Given a file named "vcr_net_http.rb" with:
When I run ruby vcr_net_http.rb --with-server
Then the output should contain "VCR works with Net::HTTP gets!"
And the file "cassettes/net_http.yml" should contain "VCR works with Net::HTTP gets!"
When I run ruby vcr_net_http.rb
Then the output should contain "VCR works with Net::HTTP gets!".
Given a file named "vcr_net_http.rb" with:
When I run ruby vcr_net_http.rb --with-server
Then the output should contain "VCR works with Net::HTTP gets!"
And the file "cassettes/net_http.yml" should contain "VCR works with Net::HTTP gets!"
When I run ruby vcr_net_http.rb
Then the output should contain "VCR works with Net::HTTP gets!".
Given a file named "vcr_https.rb" with:
When I run ruby vcr_https.rb
Then the output should contain "VCR gist"
And the file "cassettes/https.yml" should contain "VCR gist"
When I modify the file "cassettes/https.yml" to replace "VCR gist" with "HTTPS replaying works"
And I run ruby vcr_https.rb
Then the output should contain "HTTPS replaying works".
hook_into |
:webmock |
hook_into |
:webmock |
hook_into |
:webmock |
hook_into |
:webmock |
hook_into |
:webmock |