racket-mock icon indicating copy to clipboard operation
racket-mock copied to clipboard

Mocking library for Racket

Results 15 racket-mock issues
Sort by recently updated
recently updated
newest added

I'm currently writing tests for a file that has a bunch of functions modifying shared state and, based on that state, performing I/O, sometimes using callbacks/thunks created in other functions....

Did I mention I'm a huge fan of the arguments package? There's just one thing that I wish it had -- syntactic unpacking of arguments at definition and at invocation...

Reflecting on arity information is pretty disorganized. There's `procedure-arity-includes?`, `procedure-arity`, `arity-includes?`, `procedure-keywords`, `normalize-arity`, and `arity=?`. A small package to complement `arguments` might help here.

enhancement
args-pkg
question

This is mostly to make sure I understand the syntax system better. Currently `define/mock` and `with-mocks` communicate in the following manner: 1. The `define/mock` form creates an identifier for each...

cleanup

By making mock call histories [disposables](http://docs.racket-lang.org/disposable/), it should be possible to provide a variant of `with-mocks` that uses [fixtures](http://docs.racket-lang.org/fixture/). This could be a potential solution to #31, as nested test...

enhancement

Testing with mocks can have lots of subtle cases where it's not clear how to properly use them. A Guide as discussed in #10 would help somewhat, but many approaches...

docs

Mocks use some fairly complex macrology. A document describing the general strategy and some of the hairier details would be very useful to myself for future reference, and possibly useful...

docs

It should be possible to impose contracts on mock behaviors, such as "this behavior should always return an integer". This can be combined with machinery to pull contracts off of...

enhancement

If I mock out a dependency with a contract, I'm vulnerable to "falsely passing" tests if that dependency's API changes. When using `define/mock`, it should be possible to automatically extract...

enhancement

Often a function tested with mocks may have multiple behaviors that need to be tested and which require mocks be set up in different ways. `mock-reset!` and `with-mock-behavior` provide building...

enhancement