-
Notifications
You must be signed in to change notification settings - Fork 340
Provide mocking for S3/S4 methods and R6 classes #2197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good!
Co-authored-by: Emil Hvitfeldt <[email protected]>
|
Claude finished @hadley's task —— View job Code Review
Issues FoundBug in R6 mocking (line 94): The string interpolation local_mocked_bindings(!!class$classname := mocked_class, .env = frame)or name <- class$classname
local_mocked_bindings("{name}" := mocked_class, .env = frame)Unused variable: Otherwise the implementation looks solid - good input validation, proper cleanup with |
New
local_mocked_s3_method(),local_mocked_s4_method(), andlocal_mocked_r6_class()allow you to mock S3 and S4 methods and R6 classes.Fixes #1892. Fixes #1916.