Add templates to exercises batch 1#1771
Conversation
|
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. For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping |
|
This pr is dependent on #1770 |
| def test_basic | ||
| # skip | ||
| assert_equal 'PNG', Acronym.abbreviate('Portable Network Graphics') | ||
| assert_equal "PNG", Acronym.abbreviate("Portable Network Graphics") |
There was a problem hiding this comment.
I prefer single quotes... but... it should be consistent throughout the repository, either way.
| # skip | ||
| allergies = Allergies.new(0) | ||
| refute allergies.allergic_to?("eggs"), "Tom is not allergic, but it says he is." | ||
| refute allergies.allergic_to?("eggs"), "Tom is allergic, but it says he is not." |
There was a problem hiding this comment.
Instead of changing the wording, change from refute to assert? A bit of mental gymnastics happening here. ;)
There was a problem hiding this comment.
good catch, will fix that so it is like it was before
| skip | ||
| allergies = Allergies.new(1) | ||
| assert allergies.allergic_to?("eggs"), "Tom is allergic, but it says he is not." | ||
| assert allergies.allergic_to?("eggs"), "Tom is allergic, but it says he is." |
There was a problem hiding this comment.
Tom is allergic and it confirms that... so why use the word "but"?
|
Should this be in Draft status? I presume you are still working it. I see: Lack of this file causing the generators to fail. |
* Enhance underscore method to filter invalid characters and update test file naming convention * Add test case which test underscore for special characters * Use character classes in regex. Also expose description for nested test cases. * Underscore must not create multiple underscores around special characters
|
It was dependent on the pr just merged, so it should now pass |
* Fix exercise naming in generator (#1770) * Enhance underscore method to filter invalid characters and update test file naming convention * Add test case which test underscore for special characters * Use character classes in regex. Also expose description for nested test cases. * Underscore must not create multiple underscores around special characters * Add templates to exercises batch 1 (#1771) * Make test name unique in allergies * Changed exercises to use single quotes. Changed template for allergies so it should match the old version. * Update acronym solution to work on the new test * Fix import and class in atbash test * Fix exercise naming in generator (#1770) (#1774) * Enhance underscore method to filter invalid characters and update test file naming convention * Add test case which test underscore for special characters * Use character classes in regex. Also expose description for nested test cases. * Underscore must not create multiple underscores around special characters --------- Co-authored-by: Victor Goff <keeperotphones+github@gmail.com> --------- Co-authored-by: Victor Goff <keeperotphones+github@gmail.com>
Includes: