a method to help with testing/debugging #24

wants to merge 1 commit into

1 participant



I have found myself checking FakeWeb::Registry.uri_map a lot lately. Most of the time when I do this I am looking to make sure that I am stubbing the correct uris. This is necessary when I have helper methods generate stubs dynamically....

Anyways, I did a closure over uri_map. Not sure this is the most idiomatic way to handle this, but it led to some nice syntax.

Fakeweb::Registry.uri_map.inspect #=> [uri,uri]

Also, I am thinking of adding a counter the registry that show how many time the stubbed uri has been hit. Any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment