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

AssertionError still yields passing test #684

Closed
tomjw64 opened this issue May 2, 2019 · 0 comments · Fixed by #686
Closed

AssertionError still yields passing test #684

tomjw64 opened this issue May 2, 2019 · 0 comments · Fixed by #686
Labels
Milestone

Comments

@tomjw64
Copy link

tomjw64 commented May 2, 2019

The following snippet of test code yields a correctly failing test in spek version 2.02 but yields an incorrectly passing test in spek version 2.03

package spekbug.deleteme

import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

object SpekTest: Spek({ describe("spek") { it("has a bug") { assert(false) }} })

Here is the gradle build file, setting the spek version on the first line if it comes in handy:

val spekVersion = "2.0.3"

plugins {
  kotlin("jvm") version "1.3.31"
}

repositories {
  jcenter() 
}

dependencies {
  implementation(kotlin("stdlib-jdk8"))
  testImplementation("org.spekframework.spek2:spek-dsl-jvm:${spekVersion}")
  testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:${spekVersion}")  
}

tasks.test {
  testLogging {
    events("PASSED", "FAILED")
  }
  useJUnitPlatform {
    includeEngines("spek2")
  }
}

👍 Running with val spekVersion=2.0.2 =>

> Task :test FAILED

spekbug.deleteme.SpekTest > has a bug FAILED
    java.lang.AssertionError at LibraryTest.kt:6

👎 Running with val spekVersion=2.0.3 =>

> Task :test

spekbug.deleteme.SpekTest > has a bug PASSED
@raniejade raniejade added this to the 2.0.4 milestone May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants