3 ms·
I imagine this can only work on getters? How do you use this when code makes state changes?
by lasdfas 11y ago
I imagine this can only work on getters? How do you use this when code makes state changes?
- tomtompl 11y agoIt only should be used for code which doesn't have side effects. According to original github lib.
- chucksmash 11y agoFrom Github's Scientist [1]: Because `enabled?` and `run_if` determine when a candidate runs, it's impossible to guarantee that it will run every time. For this reason, Scientist is only safe for wrapping methods that aren't changing data. When using Scientist, we've found it most useful to modify both the existing and new systems simultaneously anywhere writes happen, and verify the results at read time with `science`. [1]: https://github.com/github/scientist/blob/master/README.md#designing-an-experiment https://github.com/github/scientist/blob/master/README.md#de...