docs.rs failed to build enforce-0.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Enforce

Fluid Assertions in Rust

Example

Uses stainless for testing syntax

describe! vec {
    describe! push {
        before_each {
            let mut v = vec![1u, 2, 3];
        }

        it "should increase the length by 1" {
            let old = v.len();
            v.push(4u);
            // Fluid chain with informative error messages.
            (enforce!(old + 1)).is().equal(v.len());
        }

        it "should add another value to the end of the vec" {
            v.push(4u);
            // Has `some`, `none`, `ok`, and `err` methods for checking Option
            // and Result APIs.
            (enforce!(*v.get_mut(3))).is().some();
        }
    }
}

Failed Assertion

Enforce Error file.rs:17 - map.find("no such key") is None

License

MIT