Struct cucumber_rust::Cucumber[][src]

pub struct Cucumber<W: World> { /* fields omitted */ }

Implementations

impl<W: World> Cucumber<W>[src]

pub fn new() -> Cucumber<W>[src]

Construct a default Cucumber instance. Comes with the default EventHandler implementation responsible for printing test execution progress.

pub fn with_handler<O: EventHandler>(event_handler: O) -> Self[src]

Construct a Cucumber instance with a custom EventHandler.

pub fn steps(mut self: Self, steps: Steps<W>) -> Self[src]

Add some steps to the Cucumber instance. Does not replace any previously added steps.

pub fn features<P: AsRef<Path>>(
    mut self: Self,
    features: impl IntoIterator<Item = P>
) -> Self
[src]

A collection of directory paths that will be walked to find ".feature" files.

Removes any previously-supplied features.

pub fn step_timeout(mut self: Self, step_timeout: Duration) -> Self[src]

If Some, enforce an upper bound on the amount of time a step is allowed to execute. If Some, also avoid indefinite locks during step clean-up handling (i.e. to recover panic info)

pub fn enable_capture(mut self: Self, enable_capture: bool) -> Self[src]

If true, capture stdout and stderr content during tests.

pub fn scenario_regex(mut self: Self, regex: &str) -> Self[src]

pub fn cli(self) -> Self[src]

Call this to incorporate command line options into the configuration.

pub async fn run(self) -> RunResult[src]

Run and report number of errors if any

pub async fn run_and_exit(self)[src]

Convenience function to run all tests and exit with error code 1 on failure.

Trait Implementations

impl<W: World> Default for Cucumber<W>[src]

Auto Trait Implementations

impl<W> !RefUnwindSafe for Cucumber<W>[src]

impl<W> !Send for Cucumber<W>[src]

impl<W> !Sync for Cucumber<W>[src]

impl<W> Unpin for Cucumber<W>[src]

impl<W> !UnwindSafe for Cucumber<W>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.