Skip to content

Commit

Permalink
Fix broken error handling specs
Browse files Browse the repository at this point in the history
The reason the specs are failing is because of the following change
in the webmock gem:
bblimke/webmock@1c48030#diff-4fd2506a42939f27882b390651103483

RequestStub:to_timeout method now raises a Net::OpenTimeout exception
instead of a Timeout::Error. The Net::OpenTimeout error in the
NetHttp adapter is wrapped in a Faraday::ConnectionFailed error.
  • Loading branch information
harrisred committed Jun 4, 2019
1 parent 7345c3c commit 21d9323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/support/shared_examples/error_handling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
end

describe 'response timeout' do
let(:response) { request_stub.to_timeout }
let(:response) { request_stub.to_raise(Timeout::Error) }

it 'raises Skroutz::TimeoutError' do
expect { request }.to raise_error(Skroutz::TimeoutError)
Expand Down

0 comments on commit 21d9323

Please sign in to comment.