You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to send Pull Request, but rspec test fails with this code.
rspec ./spec/yahoo_stock/interface/quote_spec.rb:199 # YahooStock::Interface::Quote get should use uri to get the content
rspec ./spec/yahoo_stock/interface/quote_spec.rb:204 # YahooStock::Interface::Quote get should get response for the uri
rspec ./spec/yahoo_stock/interface/quote_spec.rb:209 # YahooStock::Interface::Quote get should parse the uri
rspec ./spec/yahoo_stock/interface/quote_spec.rb:214 # YahooStock::Interface::Quote get should check the response code
rspec ./spec/yahoo_stock/interface/quote_spec.rb:219 # YahooStock::Interface::Quote get should get the body of the response if returned code is 200, ie success
rspec ./spec/yahoo_stock/interface/scrip_symbol_spec.rb:23 # YahooStock::Interface::ScripSymbol get should find or generate the uri once in the get method and once in the et method of the super class
How can I fix uri problem without breaking Rspec test?
The text was updated successfully, but these errors were encountered:
sorry for the late reply, do you have a PR for the fix? then I might be able to give the right suggestion, OTOH I don't think its just the specs but I think your changes are actually breaking the code
Like
^GSPC
, some stock symbol have a charactor^
, that causesYahooStock::Interface::InterfaceError: bad URI(is not URI?):
error.I fixed the by replacing in
lib/yahoo_stock/interface.rb
response = Net::HTTP.get_response(URI.parse(uri))
to
response = Net::HTTP.get_response(URI.parse(URI.encode(uri)))
I wanted to send Pull Request, but rspec test fails with this code.
How can I fix uri problem without breaking Rspec test?
The text was updated successfully, but these errors were encountered: