Skip to content

Commit 72dfd38

Browse files
committed
Add documentation explaining set_default behavior
1 parent 55f6b4b commit 72dfd38

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ class MyExperiment
8484
end
8585
```
8686

87+
When `Scientist::Experiment` is included in a class, it automatically sets it as the default implementation via `Scientist::Experiment.set_default`. This `set_default` call is is skipped if you include `Scientist::Experiment` in a module.
88+
8789
Now calls to the `science` helper will load instances of `MyExperiment`.
8890

8991
### Controlling comparison

0 commit comments

Comments
 (0)