Skip to content

(maint) Spec fixes #273

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

Merged
merged 2 commits into from
Sep 10, 2018
Merged

(maint) Spec fixes #273

merged 2 commits into from
Sep 10, 2018

Conversation

Iristyle
Copy link
Contributor

@Iristyle Iristyle commented Sep 6, 2018

  • Prior code from 9b8a0fe used a non-obvious
    behavior in the mocking framework to return the Description value from an
    error instance.

    If the count of errors was returned was increased by 1, the code would be
    subtly wrong as mocks are generating to each call of .Errors(x) with the
    supplied values.

  • Instead, more clearly mock the actual code path, and additionally provide
    two separate messages, demonstrating they are iterated and joined properly

 - Prior code from 9b8a0fe used a non-obvious
   behavior in the mocking framework to return the Description value from an
   error instance.

   If the count of errors was returned was increased by 1, the code would be
   subtly wrong as mocks are generating to each call of .Errors(x) with the
   supplied values.

 - Instead, more clearly mock the actual code path, and additionally provide
   two separate messages, demonstrating they are iterated and joined properly
@Iristyle Iristyle requested a review from RandomNoun7 September 6, 2018 22:11
Copy link
Contributor

@glennsarti glennsarti left a comment

Choose a reason for hiding this comment

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

LGTM

@glennsarti glennsarti merged commit 963a616 into puppetlabs:master Sep 10, 2018
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