WebSpell v0.3.1 WebSpell View Source

For a tutorial on how to use WebSpell, see the README on Github.

Link to this section Summary

Functions

Add WebSpell to your http client stub module by calling use WebSpell. This adds the following methods to your module

Link to this section Functions

Link to this macro __using__(opts) View Source (macro)

Add WebSpell to your http client stub module by calling use WebSpell. This adds the following methods to your module:

  • start_link - call this method in your test before setting up any stubs
  • stub_request - call this in your test to set up a stubbed http request/response
  • call_stubbed_request - forward any http calls in your http client module to this method
  • received_request - use this function in test assertions, i.e. assert MyClient.received_request(…)
  • received_no_request - use this function in test assertions, i.e. assert MyClient.received_no_request(…)