FakeWeb registering a url but ignore it afterwards
Closed this issue · 2 comments
masterkain commented
Registered URI:
[#<FakeWeb::Responder:0x106d219f8 @uri=/http:\/\/ws\.audioscrobbler\.com\/([^\/&]+)\/\?artist=([^\/&]+)&method=album.getinfo&api_key=([^\/&]+)&album=([^\/&]+)/, @method=:any, @times=1, @options={:body=>"<lfm status=\"ok\">trimmed</lfm>"}>]
Does not match
http://ws.audioscrobbler.com/2.0/?artist=Cher&method=album.getinfo&api_key=edited&album=Prisoner
Error:
Real HTTP connections are disabled. Unregistered request: GET http://ws.audioscrobbler.com/2.0/?artist=Cher&method=album.getinfo&api_key=edited&album=Prisoner
Have a look at:
http://rubular.com/regexes/13511
masterkain commented
I forgot that if I hardcode the entire path string FakeWeb does its job, so the problem arises only when I pass a Regex object as second parameter.