diff --git a/README.md b/README.md index f4e2d040f2..4f9f093489 100644 --- a/README.md +++ b/README.md @@ -105,21 +105,26 @@ the exercise, which lives in the x-common repository. └── metadata.yml ``` -This change will need to be submitted as a pull request to the x-common repository. This pull -request needs to be merged before you can regenerate the exercise. +This change will need to be submitted as a pull request to the x-common +repository. This pull request needs to be merged before you can regenerate the +exercise. Changes that don't have to do directly with the test inputs and outputs should -be made to `lib/_cases.rb`. Then you can regenerate the exercise with -`bin/generate `. +be made to the exercise's test case generator, discussed +in [implementing a new generator](#implementing-a-generator), next. Then you +can regenerate the exercise with `bin/generate `. #### Implementing a Generator -You will need to write code to produce the code that goes inside the test methods. Your -code will live in `lib/_cases.rb`. +An exercise's test case generator class produces the code that goes inside +the minitest `test_` methods. An exercise's generator lives in +`exercises//.meta/generator/_cases.rb`, although +some generators have not yet been moved and are in `lib/_cases.rb`. -`lib/_cases.rb` contains a derived class of `ExerciseCase` (in -`lib/generator/exercise_cases.rb`) which wraps the JSON for a single test -case. The default version looks something like this: +The test case generator is a derived class of `ExerciseCase` (in +`lib/generator/exercise_cases.rb`). `ExerciseCase` does most of the work of +extracting the canonical data. The derived class wraps the JSON for a single +test case. The default version looks something like this: ``` class Case < ExerciseCase