exercism / ruby

Exercism exercises in Ruby.
https://exercism.org/tracks/ruby
MIT License
556 stars 518 forks source link

Series: Test is not testing for zero length series #1725

Closed kotp closed 1 month ago

kotp commented 1 month ago

This test now raises if the series is 0 instead of of the slice slice size being larger than the series.

This allows one to raise on normalization of user input, the series given, rather than incidentally having the slice size of 1 be larger than the series size from a zero length string.

The example solution is updated to raise specifically for a zero length series, rather than the incidental raising when slices are asked for.

github-actions[bot] commented 1 month ago

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!