spec/httpi/adapter/net_http_spec.rb in httpi-2.2.4 vs spec/httpi/adapter/net_http_spec.rb in httpi-2.2.5

- old
+ new

@@ -74,18 +74,17 @@ response = HTTPI.get(request, adapter) expect(response.body).to eq("ntlm-auth") end - it 'fatal logs when net/ntlm is not available, but ntlm authentication was requested' do + it 'does not support ntlm authentication when Net::NTLM is not available' do Net.expects(:const_defined?).with(:NTLM).returns false request = HTTPI::Request.new(@server.url + 'ntlm-auth') request.auth.ntlm("testing", "failures") - HTTPI.logger.expects(:fatal) - response = HTTPI.get(request, adapter) - expect(response.body).to eq("ntlm-auth") + expect { HTTPI.get(request, adapter) }. + to raise_error(HTTPI::NotSupportedError, /Net::NTLM is not available/) end end # it does not support digest auth