Showing 3 of total 3 results (show query)
ropensci
crul:HTTP Client
A simple HTTP client, with tools for making HTTP requests, and mocking HTTP requests. The package is built on R6, and takes inspiration from Ruby's 'faraday' gem (<https://rubygems.org/gems/faraday>). The package name is a play on curl, the widely used command line tool for HTTP, and this package is built on top of the R package 'curl', an interface to 'libcurl' (<https://curl.se/libcurl/>).
Maintained by Scott Chamberlain. Last updated 8 months ago.
httphttpsapiweb-servicescurldownloadlibcurlasyncmockingcaching
107 stars 14.07 score 240 scripts 168 dependentsr-lib
mockery:Mocking Library for R
The two main functionalities of this package are creating mock objects (functions) and selectively intercepting calls to a given function that originate in some other function. It can be used with any testing framework available for R. Mock objects can be injected with either this package's own stub() function or a similar with_mock() facility present in the 'testthat' package.
Maintained by Hadley Wickham. Last updated 1 years ago.
100 stars 11.57 score 504 scripts 5 dependentsnbenn
mockthat:Function Mocking for Unit Testing
With the deprecation of mocking capabilities shipped with 'testthat' as of 'edition 3' it is left to third-party packages to replace this functionality, which in some test-scenarios is essential in order to run unit tests in limited environments (such as no Internet connection). Mocking in this setting means temporarily substituting a function with a stub that acts in some sense like the original function (for example by serving a HTTP response that has been cached as a file). The only exported function 'with_mock()' is modeled after the eponymous 'testthat' function with the intention of providing a drop-in replacement.
Maintained by Nicolas Bennett. Last updated 2 years ago.
15 stars 3.94 score 5 scripts