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

Added new spec DSL for overriding values and functions #976

Merged
merged 1 commit into from Sep 4, 2019

Conversation

@sksamuel
Copy link
Member

commented Sep 3, 2019

No description provided.

@@ -51,7 +51,7 @@ allprojects {
group = "io.kotlintest"

if (isTravis) {
version "4.0.0." + travisBuildNumber + "-SNAPSHOT"
version "4.0." + travisBuildNumber + "-SNAPSHOT"

This comment has been minimized.

Copy link
@Kerooker

Kerooker Sep 3, 2019

Member

Was this intentional?

This comment has been minimized.

Copy link
@sksamuel

sksamuel Sep 3, 2019

Author Member

Yes, I shouldn't have set it to 4.0.0 in the first place.

@@ -74,7 +74,7 @@ interface Spec : TestListener {

fun description(): Description = Description.fromSpecClass(this::class)

val assertionMode: AssertionMode? get() = null

This comment has been minimized.

Copy link
@Kerooker

Kerooker Sep 3, 2019

Member

I believe you added this recently, so there would be no problems to refactor this, right? It didn't go into a release version

This comment has been minimized.

Copy link
@sksamuel

sksamuel Sep 3, 2019

Author Member

Correct. I only added it for 4.0 anyway.


override fun beforeTest(testCase: TestCase) {
super.beforeTest(testCase)
beforeTestFn(testCase)

This comment has been minimized.

Copy link
@Kerooker

Kerooker Sep 3, 2019

Member

Perhaps this is kind of dangerous. It wouldn't be possible to mix old syntax with new syntax this way (maybe we don't want to?), as any override could not call super

This comment has been minimized.

Copy link
@sksamuel

sksamuel Sep 3, 2019

Author Member

An override could call super, but no one is going to override before test in both places.

@sksamuel sksamuel merged commit 7adc197 into master Sep 4, 2019

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.