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

Sync: Bob #806

Merged
merged 7 commits into from
Sep 24, 2024
Merged

Sync: Bob #806

merged 7 commits into from
Sep 24, 2024

Conversation

tomasnorre
Copy link
Sponsor Contributor

Resolves #805

Copy link

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!

Copy link
Contributor

@mk-mxp mk-mxp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this! Some inputs are still out of sync.

For better readability in the online editor, you may optionally inline the object instantiation, apply the Arrange-Act-Assert pattern and keep lines shorter than about 60 characters like this:

    public function testStatingSomething(): void
    {
        $input = "Tom-ay-to, tom-aaaah-to.";
        $expected = "Whatever.";

        $subject = new Bob();
        $actual = $subject->respondTo($input)

        $this->assertEquals($expected, $actual);
    }

exercises/practice/bob/BobTest.php Outdated Show resolved Hide resolved
exercises/practice/bob/BobTest.php Outdated Show resolved Hide resolved
exercises/practice/bob/BobTest.php Outdated Show resolved Hide resolved
exercises/practice/bob/BobTest.php Outdated Show resolved Hide resolved
exercises/practice/bob/BobTest.php Outdated Show resolved Hide resolved
@tomasnorre
Copy link
Sponsor Contributor Author

For better readability in the online editor, you may optionally inline the object instantiation, apply the Arrange-Act-Assert pattern and keep lines shorter than about 60 characters like this:

Thanks for you input, i'll look into it.

@tomasnorre
Copy link
Sponsor Contributor Author

tomasnorre commented Sep 24, 2024

I don't know how the test runner would deal with it, but I would prefer personally to have a constant for each answer, to avoid risk of typos and minimize work.

const ANSWER_WHATEVER = "Whatever."
const ANSWER_SURE = "Sure."
const ANSWER_FINE = "Fine. Be that way!"
... 

@mk-mxp
Copy link
Contributor

mk-mxp commented Sep 24, 2024

I don't know how the test runner would deal with it, but I would prefer personally to have a constant for each answer, to avoid risk of typos and minimize work.

const ANSWER_WHATEVER = "Whatever."
const ANSWER_SURE = "Sure."
const ANSWER_FINE = "Fine. Be that way!"
... 

In the online editor feedback, you will never see the string such constant stands for. So, please, keep the string duplicated, even if it is against all rules of real production code.

Copy link
Contributor

@mk-mxp mk-mxp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for syncing this exercise!

@mk-mxp mk-mxp merged commit 93f6ca2 into exercism:main Sep 24, 2024
12 checks passed
@tomasnorre tomasnorre deleted the sync-bob branch September 24, 2024 15:38
@tomasnorre
Copy link
Sponsor Contributor Author

@mk-mxp Can you please assign the correct labels to the latest PRs.

@tomasnorre tomasnorre added x:action/sync Sync content with its latest version x:knowledge/elementary Little Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:type/content Work on content (e.g. exercises, concepts) x:size/small Small amount of work x:rep/small Small amount of reputation labels Sep 25, 2024
@mk-mxp
Copy link
Contributor

mk-mxp commented Sep 27, 2024

@mk-mxp Can you please assign the correct labels to the latest PRs.

Sorry, I sometimes quickly check in to merge and forget the boring details...

@tomasnorre
Copy link
Sponsor Contributor Author

No worries, I would expect at least some of the labels could be automated, based on lines changed e.g. with the x:size labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/sync Sync content with its latest version x:knowledge/elementary Little Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:rep/small Small amount of reputation x:size/small Small amount of work x:type/content Work on content (e.g. exercises, concepts)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#48in24: bob 2024-10-01
2 participants