-
Notifications
You must be signed in to change notification settings - Fork 7
WorldModule::API
jfinkhaeuser edited this page Dec 17, 2014
·
2 revisions
The API module provides simpler functionality for testing of web APIs.
The module makes two functions available:
-
has_api?
returns true if an API client instance is up and running. -
api
returns a faraday client instance, slightly enhanced to provide for slightly easier setup.
Given(/I do foo/) do
api.set_conn("http://my/api/endpoint") # works with XML and JSON APIs.
api.get "/some/relative/url.json"
end