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

Unable to run individual test with on() action #34

Open
Jkly opened this issue Mar 19, 2017 · 1 comment
Open

Unable to run individual test with on() action #34

Jkly opened this issue Mar 19, 2017 · 1 comment

Comments

@Jkly
Copy link

Jkly commented Mar 19, 2017

Plugin version: 0.3.4
IDEA 2016.3.5

When trying to run an individual spec within an on() group, the entire spec file is run instead of the individual.

For example, in the screenshot below, I ran it("should return the result of adding the first number to the second number") expecting just that test to run.
screen shot 2017-03-19 at 16 51 43

import junit.framework.TestCase.assertEquals
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on

object CalculatorSpec: Spek({
    class Calculator {
        fun sum(a: Int, b: Int): Int {
            return a + b
        }

        fun subtract(a: Int, b: Int): Int {
            return a - b
        }

    }

    describe("a calculator") {
        val calculator = Calculator()

        on("addition") {
            val sum = calculator.sum(2, 4)

            it("should return the result of adding the first number to the second number") {
                assertEquals(6, sum)
            }
        }

        on("subtraction") {
            val subtract = calculator.subtract(4, 2)

            it("should return the result of subtracting the second number from the first number") {
                assertEquals(2, subtract)
            }
        }
    }
})
@raniejade
Copy link
Owner

Yeah, it's a current limitation of the plugin.

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

No branches or pull requests

2 participants