if you search for something with an ampersand it won't encode the character properly. This is because it's using URI.encode not CGI.escape. See http://bugs.ruby-lang.org/issues/1680
URI.encode :
001:0> YouTubeIt::Client.new(:debug => true).videos_by(:query => "Stephen Malkmus & The Jicks Fall Away").videos[0].title
Submitting request [url=http://gdata.youtube.com/feeds/api/videos?max-results=25&q=Stephen+Malkmus+&+The+Jicks+Fall+Away&start-index=1&v=2].
=> "Stephen Malkmus and The Jicks - \"Senator\""
CGI.escape :
007:0> YouTubeIt::Client.new(:debug => true).videos_by(:query => "Stephen Malkmus & The Jicks Fall Away").videos[0].title
Submitting request [url=http://gdata.youtube.com/feeds/api/videos?max-results=25&q=Stephen+Malkmus+%26+The+Jicks+Fall+Away&start-index=1&v=2].
=> "Stephen Malkmus & the Jicks - Fall Away"
if you search for something with an ampersand it won't encode the character properly. This is because it's using URI.encode not CGI.escape. See http://bugs.ruby-lang.org/issues/1680
URI.encode
:CGI.escape
:(I also fixed some of the other tests)