Why is the 'palindrome products' exercise not in sync with problem spec?

I noticed that the Ruby version has just 5 tests, while the problem specification has 13 test cases.

Is this intentional?

Or just the maintainers have not got around to updating it?

Can I run the sync command and send a PR?

1 Like

According to the commits, the .toml file was in sync, but the tests havenā€™t been implemented. So they removed the entries. You can sync them if you want, but you also need to implement the new test cases.

Generally the latter in most cases :smiley:

Thatā€™s a question for the track maintainers to weigh in, if they are open to PRs. I strongly suspect the answer will be yes, but Iā€™ll let the maintainers weigh in (+cc @kotp @Meatball)

Yes, if you would like to update this with the 8 additional tests, that would be great!

2 Likes

Ok, Iā€™ll give it a shot.

1 Like

Yes, that would be appricated.

Hi again!

Does a test generator exist or not? The ruby repo README has some dead links to headings that mention generating tests. E.g.:

Canonical Data

Most exercises can be generated from shared inputs/outputs, called canonical data (see Generated Test Suites below).

But there is no ā€œGenerated Test Suitesā€ below.

Commit a1f45de39a9106731efe2c636741a327f1274b00 informs us that Katrina removed the ā€œold generatorā€ but it does not state that it was replaced.

git show a1f45de39a9106731efe2c636741a327f1274b00 shows us that it was removed, with a message stating that there was a plan to replace it.

More investigation required, as I do not see anything in bin/ that would indicate that we can generate tests, and so perhaps ā€œstage 2ā€ was never completed.

There is also no rake task that indicates they can be generated, currently

rake -T
rake rubocop         # Run Rubocop
rake test            # Run individual exercises or run all development and exercise tests
rake test:dev        # Run tests for dev
rake test:exercises  # Run the tests for all exercises

I actually already added them by hand, then second-guessed whether that was the right way to go, cause I remembered reading about test generation.

Iā€™ll send the PR shortly.

PR:

2 Likes

I have reopened and suggested changes.

1 Like