lib/you_track/client/mock.rb in you_track-0.2.0 vs lib/you_track/client/mock.rb in you_track-0.2.1
- old
+ new
@@ -20,19 +20,19 @@
attr_accessor :last_request
def url_for(path, options={})
URI.parse(
- File.join(self.url, "/rest", path.to_s)
+ File.join(self.url.to_s, "/rest", path.to_s)
).tap do |uri|
if query = options[:query]
uri.query = Faraday::NestedParamsEncoder.encode(query)
end
end.to_s
end
def initialize(options={})
- @url = options[:url]
+ @url = URI.parse(options[:url])
@username = options[:username]
end
def response(options={})
body = options[:response_body] || options[:body]