Trait cucumber::writer::Summarizable

source ·
pub trait Summarizable { }
Expand description

Marker indicating that a Writer can be wrapped into a Summarize.

Not any Writer can be wrapped into a Summarize, as it may transform events inside and the summary won’t reflect outputted events correctly.

So, this trait ensures that a wrong Writers pipeline cannot be build.

§Example

MyWorld::cucumber()
    .with_writer(
        // `Writer`s pipeline is constructed in a reversed order.
        writer::Basic::stdout()
            .fail_on_skipped() // Fails as `Summarize` will count skipped
            .summarized()      // steps instead of failed.
    )
    .run_and_exit("tests/features/readme")
    .await;
MyWorld::cucumber()
    .with_writer(
        // `Writer`s pipeline is constructed in a reversed order.
        writer::Basic::stdout() // And, finally, print them.
            .summarized()       // Only then, count summary for them.
            .fail_on_skipped(), // First, transform skipped steps to failed.
    )
    .run_and_exit("tests/features/readme")
    .await;

Implementors§

source§

impl<T: NonTransforming> Summarizable for T

source§

impl<W, Wr, F> Summarizable for Repeat<W, Wr, F>