Closed christopher-dG closed 5 years ago
Right now you can only mock all of a function's methods. It would be nice to be able to do something like this:
mock((+, Int, Int) => (a, b) -> 2a + 2b) do plus @assert 0x1 + 0x2 == 0x3 # Not mocked @assert 1 + 2 == 6 # Mocked @assert called_once_with(plus, 1, 2) end
Right now you can only mock all of a function's methods. It would be nice to be able to do something like this: