Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

When the result of a request is an exception, raise it, rather than t…

…rying to read a body from it.
  • Loading branch information...
commit 6d92eb8b4a6e86242b43edc6f0d213f327051d3a 1 parent e06558d
@myronmarston authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 features/step_definitions/vcr_steps.rb
View
4 features/step_definitions/vcr_steps.rb
@@ -210,7 +210,9 @@ def capture_response(url)
response_num = response_num.to_i || 0
response_num -= 1 if response_num > 0 # translate to 0-based array index.
regex = /#{regex_str}/i
- get_body_string(@http_requests[url][response_num]).should =~ regex
+ response = @http_requests[url][response_num]
+ raise response if response.is_a?(Exception)
+ get_body_string(response).should =~ regex
end
Then /^there should not be a "([^\"]*)" library file$/ do |cassette_name|
Please sign in to comment.
Something went wrong with that request. Please try again.