-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use FileMock and DirMock instead of Monkey Patching (#35792)
Summary: Pull Request resolved: #35792 This Diff fixes a problem we have when running Ruby tests. The previous approach was monkey-patching the Ruby File and Dir classes to override some behaviours we needed during tests. However, these classes are also used by the test runners to properly read and run the tests, therefore when the tests were failing, the stream weren't closed properly and we received the wrong errors. This problem was also preventing us from adopting other Ruby tools like SimpleCov to compute code coverage. ## Changelog: [internal] - refactor Ruby tests not to monkey patch Dir and File Reviewed By: dmytrorykun Differential Revision: D42414717 fbshipit-source-id: 879b9928da1a083ebf9c81b1f510eaa039376042
- Loading branch information
1 parent
8bef1b3
commit 88a1b8e
Showing
13 changed files
with
170 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.