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 | _ => () }
})
}pub suberror MoonspecError {
UndefinedStep(String, String, String, Array[String])
PendingStep(String, String, String)
StepFailed(String, String, String)
ScenarioFailed(String, String, Array[MoonspecError])
RunFailed(String, Array[MoonspecError])
}type CompiledStepimpl Eq for ScenarioInfoimpl Show for ScenarioInfopub(all) enum StepArg {
IntArg(Int)
FloatArg(Double)
StringArg(String)
WordArg(String)
CustomArg(String)
}pub(all) struct StepDef {
keyword : StepKeyword
pattern : String
handler : StepHandler
source : StepSource?
}fn StepDef::given(pattern : String, handler : (Array[StepArg]) -> Unit raise, source? : StepSource) -> StepDeffn StepDef::step(pattern : String, handler : (Array[StepArg]) -> Unit raise, source? : StepSource) -> StepDeffn StepDef::then(pattern : String, handler : (Array[StepArg]) -> Unit raise, source? : StepSource) -> StepDef#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) enum StepKeyword {
Given
When
Then
Step
}impl Eq for StepKeywordimpl Show for StepKeywordpub(all) struct StepRegistry {
// private fields
}fn StepRegistry::find_match(self : StepRegistry, text : String, keyword? : String) -> StepMatchResultfn 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) -> Unitpub(all) struct StepSource {
uri : String?
line : Int?
}impl Eq for StepSourceimpl Show for StepSourcefn pending_step_error(step~ : String, keyword~ : String, message~ : String) -> Errorfn scenario_failed_error(scenario~ : String, feature~ : String, errors~ : Array[MoonspecError]) -> MoonspecErrorfn step_failed_error(step~ : String, keyword~ : String, message~ : String) -> ErrorInstall
Download zipBDD test framework for MoonBit with Gherkin and Cucumber Expressions