cucumber::Then! [] [src]

macro_rules! Then {
    ($cuke:expr, $regex:expr, $body:expr) => { ... };
}

Add a Then step to a CucumberRegistrar

Example

#[macro_use]
extern crate cucumber;

use cucumber::{
  InvokeResponse,
  CucumberRegistrar,
  Cucumber
};

pub fn main () {
  let mut cucumber: Cucumber<u32> = Cucumber::new();

  Then!(cucumber, "^I have (\\d+) coins left$", |_, world: &mut u32, (coin_count,): (u32,)| {
    InvokeResponse::check_eq(*world, coin_count)
  });
}