-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Runnable short title #1448
Runnable short title #1448
Conversation
3878123
to
7256692
Compare
Needs tests asserting this works. |
7256692
to
2bcf2c9
Compare
Added basic specs for |
Some discussion in #1447. |
2bcf2c9
to
cbdce38
Compare
@boneskull In #1447, you ask "Practically, how does a hook receive a title?" The crux of the issue is that titles were all set when objects such as Runnables and Hooks were initialized. Since Hooks were run multiple times, the static title failed to reflect the context in which it was being run. The first part of this refactor was to retrieve the Runnable and Hook titles through a method rather than a property, so that it could be retrieved dynamically by the Reporters. In the case of Runnables, this method simple proxied to the existing static |
Is there anyhting holding of a merge of either this or #1447? @boneskull @danielstjules? LGTM :) @duncanbeevers thanks for the effort! |
2f458ab
to
2952eca
Compare
Closing in favor of #1447 |
Fixes #1230
In this approach, rather than modifying the hook titles at failure time, a run-time
shortTitle
method is exposed onSuite
,Runnable
, andHook
.In the case of a
Suite
and aRunnable
, this method returns the current value oftitle
attribute.In the case of a
Hook
running in the context of a test, theshortTitle
will reflect both the hook's own title and the title of the currently-executing test.