You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use mockery::stub() in combination with an R6 class, which works out fine for functions at a depth of 1. Here is a simplified R6 example:
mockery is no longer under active development as we now recommend using testthat::local_mocked_bindings() instead. That doesn't yet support mocking R6 methods, but we could certainly consider it if it's a popular need.
I am trying to use
mockery::stub()
in combination with an R6 class, which works out fine for functions at a depth of 1. Here is a simplified R6 example:I can successfully stub
self$add_y
like this:However I cannot do the same for
self$add_z
at a depth of 2. This results in an actual value of 5 as expected without stubbing:I'm not sure if this feature is applicable to R6 classes in this way, so I appreciate any feedback!
The text was updated successfully, but these errors were encountered: