Module: Rapidash
- Defined in:
- lib/rapidash/test_client.rb,
lib/rapidash.rb,
lib/rapidash/base.rb,
lib/rapidash/client.rb,
lib/rapidash/urlable.rb,
lib/rapidash/version.rb,
lib/rapidash/http_client.rb,
lib/rapidash/oauth_client.rb,
lib/rapidash/resourceable.rb,
lib/rapidash/response_error.rb
Overview
Rapidash::TestClient A dummy client for testing with. Create a new test client by including this module and initializing with a set of responses. Example:
class TesterClient
include Rapidash::TestClient
end
responses = {
get: { "foo" => "bar" },
post: { "baz" => "data" }
}
client = TesterClient.new(responses)
Example with JSON support:
responses = {
get: { "foo" => '{"some": 123, "json": 456}' }
}
client = TesterClient.new(responses, json: true)
Defined Under Namespace
Modules: HTTPClient, OAuthClient, Resourceable, TestClient, Urlable Classes: Base, Client, ConfigurationError, ResponseError
Constant Summary collapse
- VERSION =
"0.4.0"