Skip to content
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

Refactor hello-world test with simplified structure and explanatory comments #298

Merged
merged 1 commit into from
Jul 26, 2018

Conversation

m-dango
Copy link
Member

@m-dango m-dango commented Jul 21, 2018

No description provided.

@trosel
Copy link

trosel commented Jul 21, 2018

Coming from #297

Thanks for starting this @mienaikage !

Is it necessary to use the JSON system at all? Introducing pod and all that pomp doesn't seem necessary for such a trivial use case.

Also, I'm not even sure if this manner of testing would be considered a best practice in the Perl world. Should just be about 5 is checks, I think.

@m-dango
Copy link
Member Author

m-dango commented Jul 21, 2018

The JSON is taken directly from Exercism's problem-specifications, which is automatically included whenever an exercise is generated on this track. It allows for exercises to be easily updated if a test case is added/removed/changed.

It may not be a necessity for this exercise in particular, but hello-world has undergone changes before, and canonical data from problem-specifications is used across almost every exercise in this track. Having it makes it easier to both maintain existing exercises and implement new ones.

Ideally $=data would be used instead, but that is not yet implemented on rakudo.

@m-dango m-dango changed the title [WIP] Refactor hello-world test with simplified structure and explanatory comments Refactor hello-world test with simplified structure and explanatory comments Jul 26, 2018
@m-dango
Copy link
Member Author

m-dango commented Jul 26, 2018

I'm going to make a separate change to the generator so that the canonical data can be removed without the exercise having to be maintained separately from the rest of the exercises on the track.

@m-dango m-dango merged commit 26d4bc9 into exercism:master Jul 26, 2018
@m-dango m-dango deleted the hello-world-refactor branch July 26, 2018 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants