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

Allow optional description to be lazily evaluated function #364

Merged
merged 2 commits into from
Nov 18, 2019

Conversation

ansd
Copy link
Collaborator

@ansd ansd commented Nov 16, 2019

As suggested in #193 and #351, allow a single argument of type func() string to be passed as an optional description. This function gets lazily evaluated if there's a failure and the returned string is used to annotate the failure message.

@ghost
Copy link

ghost commented Nov 18, 2019

This looks like a great addition! Very handy.

Co-authored-by: David Ansari <dansari@pivotal.io>
@blgm blgm merged commit bf64010 into onsi:master Nov 18, 2019
@blgm
Copy link
Collaborator

blgm commented Nov 18, 2019

Looks great to me too. Thanks @ansd!

blgm pushed a commit that referenced this pull request Nov 18, 2019
@ansd ansd deleted the description-function branch November 18, 2019 19:16
@nkuacac
Copy link

nkuacac commented May 18, 2023

It seems the lazily evaluated function lost.
image
the "descs" not updated.

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.

4 participants