-
Notifications
You must be signed in to change notification settings - Fork 531
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
Document why we ignore all tests but the first #279
Comments
Hello. There is a paragraph in https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/exercise-test-suites.md added by exercism/docs#34 that explains that some tracks do this, and gives some explanation. Your contribution might simply be to link to that document in this track's README (or other suitable place). If you believe that that document sufficiently explains why this track does this, that would be all you do in your contribution. If you believe that extra explanation is required, you would of course add it. |
Why did you remove |
explained
so it sounds like you agree with the latter. |
As someone who started learning Rust two weeks ago, two things to comment on: 1 - Rust is actually at a disadvantage compared to some other languages for a new user, due to the intelligence of the compiler. While the tests are supposed to be incremental, I reverted to doing cargo build, rather than cargo test, then moving back once cargo build works. Maybe we can make this more explicit. 2 - I don't know if I've read anywhere about |
Regarding to your first point, one way to avoid this is to provide lib.rs files, we discussed this a few times, start reading #117 if interested. |
Actually, I'm going to call this resolved by #334 if that's OK, because the README links to https://github.com/exercism/docs/blob/master/language-tracks/exercises/anatomy/test-suites.md and the example test suite in the README shows the second test being ignored. If it needs to be more explicitly called out that second-and-subsequent tests should be ignored, just reopen. |
I just started using exercism (I have a bit of experience with Rust) and I am puzzled by the tests being ignored. |
At the top of the Rust track README there is this:
Following that link, we get this:
In short, the Rust track encourages incremental TDD by ignoring all but the first test, and implying that students should un-ignore one test at a time as they write a solution which passes all of them. This is arguably a wart in the Rust track; I certainly prefer to run all the tests every time. However, it's a long-standing policy which we haven't had occasion to revisit. Some potential ways forward, if you feel strongly about this:
|
We should document this somewhere in this track. We may incorporate by reference any other documentation elsewhere in Exercism such as exercism/exercism#856, but it is convenient to have it on hand somewhere in this track, so we can explain in what way the Exercism-wide policy affects this track.
This documentation should go in the README (or some suitable place) so it is visible to contributors who may wish to contribute a new exercise.
It would probably also be good to show this in a place visible to students, so they understand why their tests have
#[ignore]
everywhere. Consider placing it in docs/TESTS.md I suppose? https://github.com/exercism/xrust/blob/master/docs/TESTS.md - it shows up on http://exercism.io/languages/rust/tests.Note that before #266, GETTING_STARTED.md used to say that tests were ignored but still did not explain why. Now there is only one test (which is not ignored) in hello-world, so it it is no longer the right place to put this explanation, just providing a bit of history.
I am unsure of whether to nominate this for good first patch. On the one hand, I figure this is a decision with historical context behind it, and the explanation might be best written by someone with that context. On the other hand, the explanation might instead be best written by a newcomer who benefitted from one-test-at-a-time and so can explain it firsthand.
So, feel free to chime in if you have experienced the benefits and want to explain it.
The text was updated successfully, but these errors were encountered: