moonrockz/moonspec/core does not have a README file
pub(open) trait Hooks {
before_scenario(Self, ScenarioInfo) -> Unit raise = _
after_scenario(Self, ScenarioInfo, String?) -> Unit raise = _
before_step(Self, StepInfo) -> Unit raise = _
after_step(Self, StepInfo, String?) -> Unit raise = _
}struct MyWorld { mut count : Int } derive(Default)
impl @moonspec.World for MyWorld with register_steps(self, s) {
s.given("a count of {int}", fn(args) {
match args[0] { @moonspec.IntArg(n) => self.count = n | _ => () }
})
}impl Eq for ScenarioInfoimpl Show for ScenarioInfopub(all) enum StepArg {
IntArg(Int)
FloatArg(Double)
StringArg(String)
WordArg(String)
CustomArg(String)
}#deprecated("Use `struct T(A)` to declare a newtype and use `.0` access the underlying type instead.")
fn StepHandler::inner(self : StepHandler) -> ((Array[StepArg]) -> Unit raise)pub(all) struct StepInfo {
keyword : String
text : String
}pub(all) struct StepRegistry {
// private fields
}fn StepRegistry::find_match(self : StepRegistry, text : String) -> (StepHandler, Array[StepArg], String)?fn StepRegistry::given(self : StepRegistry, pattern : String, handler : (Array[StepArg]) -> Unit raise) -> Unitfn StepRegistry::step(self : StepRegistry, pattern : String, handler : (Array[StepArg]) -> Unit raise) -> Unitfn StepRegistry::then(self : StepRegistry, pattern : String, handler : (Array[StepArg]) -> Unit raise) -> Unitfn StepRegistry::when(self : StepRegistry, pattern : String, handler : (Array[StepArg]) -> Unit raise) -> UnitInstall
Download zipBDD test framework for MoonBit with Gherkin and Cucumber Expressions