-
-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bowling: Add JSON test data #240
Conversation
Looks good to me. There are messages here, looking at the example.rb those would be expected to be feedback when errors aren't raised, but generic enough to not drive an implementation too much. |
I never figured out how to score bowling, so keep that in mind while I ask some questions Do all the tests cover a unique case? For example, what parts of the students' implementation has to change between this test and this one? If nothing has to change, then I suggest getting rid of one of those tests. Tests are better if they cover a new, possibly unexpected, case. So what are the bare minimum number of tests that will completely exercise the concept of scoring a bowling game? I'm not sure about these two tests. Why can't I get a score (0, presumably) at the start of the game? Or in the 7th frame? I don't bowl often, but I know that those machines can tell me my score as I go along. |
@IanWhitney I think we can indeed remove the I implemented it this way because the exercise specified that we should take the score only at the end of the game. I think it was done this way to easy the solution, since we can't take score of the game all the time (if we have a strike or spare we need to wait for the next frames to compute it correctly). |
Looking at Uncle Bob's powerpoint (powerpoint?!), his kata has just 5 tests. That might be enough to cover all the edge cases. But I leave that up to those who know more about bowling.
Yeah, Uncle Bob's kata does specify that you can't score until after the 10th frame. It does avoid some complexity, which is probably fine. |
Should we merge this into the wild and let folks make generators for it, and see how it pans out? It may very well be that the number of tests will dwindle as we go. I believe the file itself is written well, very much patterned for simplicity. |
I like tests that pass an idea of progression. You start with the simple cases than you start testing the edge cases, even if they overlap a little. Some tests are also about constraints, which I think are important and were not implemented in Uncle Bob's kata (probably to avoid complexity). |
About the redundant tests: are they purely redundant or do they potentially help people triangulate? |
I my opinion these tests are guiding the thinking process.
I like these kind of tests, but I know that they are sometimes redundant and not everyone agrees with them. |
I think that as long as it's intentional I'm happy with it. Let's do this! |
No description provided.