You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 21, 2019. It is now read-only.
This is possible in Cuke4Duke too, but currently only if you’re using Java or Scala Step Definitions.
Java
Just make sure your Step Definition class inherits from cuke4duke.Steps, and make sure its constructor takes a cuke4duke.StepMother in the constructor. Example:
public class CallingSteps extends Steps {
public CallingSteps(StepMother stepMother) {
super(stepMother);
}
@When("^I call another step$")
public void iCallAnotherStep() {
Given("it is magic"); // This will call a step defined somewhere else.
}
}
Scala
In Scala things are a little simpler:
class CallingSteps extends ScalaDsl {
When("^I call another step$") { () =>
Given("it is magic")
}
}