-
Notifications
You must be signed in to change notification settings - Fork 627
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
Around advice in the spec DSL #794
Comments
@Kerooker ? |
Perhaps this can be implemented as an extension?
…On Wed., May 29, 2019, 17:50 Stephen Samuel, ***@***.***> wrote:
@Kerooker <https://github.com/Kerooker> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#794>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMBCI5KWN45JOIQWW4D563PX3UBJANCNFSM4HQVCHFQ>
.
|
Yes, we just need to make Spec itself have a |
Do we want to add more things to the spec class? I believe this can be delegated to a listener that has a |
Can it?
…On Wed, 29 May 2019 at 16:37, Leonardo Colman Lopes < ***@***.***> wrote:
Do we want to add more things to the spec class?
I believe this can be delegated to a listener that has a beforeTest and
afterTest, without the need to add another construct. What do you think?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#794>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFVSGUR7XGFHGUAT2OETFDPX3ZQZANCNFSM4HQVCHFQ>
.
|
Similar to the |
Yes, but it's the ability to keep a variable in scope.
val a = A()
runTest
a.stop()
…On Wed, 29 May 2019 at 16:58, Leonardo Colman Lopes < ***@***.***> wrote:
Similar to the constantNow listeners, it runs beforeTest and afterTest,
isn't that what we kinda want?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#794>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFVSGTMYP3FJ5LOPQ73WETPX34BLANCNFSM4HQVCHFQ>
.
|
I think we can do that with listeners, can't we? |
Now without creating the variables outside of the before / after scopes. |
This can be easily done with the new DSL. |
Question/todo: add extension callbacks to the new DSL like the other callbacks. |
I had a little play with this: eg aroundTest { runtest ->
println("Starting test")
runtest {
println("After test")
}
} |
Now in master. |
The text was updated successfully, but these errors were encountered: