Skip to content
/ encrust Public

Port of Cucumber to support Behaviour-Driven Development (BDD) with the Rust language

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

ianlet/encrust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encrust

Build Status

Encrust is a testing framework for Rust (nightly) to support Behaviour-Driven Development (BDD). It is focused on making acceptance tests easy to implement and to maintain. Here's an example of what a complete test suite would look like:

#![feature(plugin)]
#![plugin(encrust_codegen)]

extern crate encrust;
extern crate my_super_crate;

use my_super_crate::Belly;

#[context]
#[derive(Default)]
struct FeatureContext {
    pub belly: Belly,
}

#[given("my belly is empty")]
fn my_belly_is_empty(context: &mut FeatureContext) {
    context.belly.empty();
}

#[when("I eat :cuke_count cukes")]
fn i_eat_cukes(cuke_count: i32, context: &mut FeatureContext) {
    context.belly.eat(cuke_count);
}

#[then("my belly should be full")]
fn my_belly_should_be_full(context: &mut FeatureContext) {
    assert!(context.belly.is_full());
}

Documentation

Coming soon...

License

Encrust is licensed under either of the following, at your option:

About

Port of Cucumber to support Behaviour-Driven Development (BDD) with the Rust language

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages