Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,9 @@ When the experiment runs, all candidate behaviors are tested and each candidate
Define the candidates with named `try` blocks, omit a `use`, and pass a candidate name to `run`:

```ruby
experiment = MyExperiment.new("various-ways") do |e|
e.try("first-way") { ... }
e.try("second-way") { ... }
end
experiment = MyExperiment.new("various-ways")
experiment.try("first-way") { ... }
experiment.try("second-way") { ... }
Comment on lines +514 to +516

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there's a tap missing?

Suggested change
experiment = MyExperiment.new("various-ways")
experiment.try("first-way") { ... }
experiment.try("second-way") { ... }
experiment = MyExperiment.new("various-ways").tap do |e|
e.try("first-way") { ... }
e.try("second-way") { ... }
end


experiment.run("second-way")
```
Expand Down