lib/capybara/httpclient_json/driver.rb in capybara-json-0.0.3 vs lib/capybara/httpclient_json/driver.rb in capybara-json-0.1.0

- old
+ new

@@ -64,13 +64,13 @@ @current_url = @rack_server.url(path) begin @response = client.__send__(method, @current_url, params, headers, options) rescue HTTPClient::BadResponseError => e - raise Capybara::InfiniteRedirectError + if e.message == "retry count exceeded" + raise Capybara::InfiniteRedirectError + else + @response = e.res + end end - end - - def url_for(path) - path end end