expecting 0.2.0

Rust macros that test conditions without panicking
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Expecting

[![Crates.io](https://img.shields.io/crates/v/expecting)](https://crates.io/crates/expecting)
[![Documentation](https://docs.rs/expecting/badge.svg)](https://docs.rs/expecting)
[![Crates.io](https://img.shields.io/crates/l/expecting)](LICENSE)

**Expecting** provides macros for testing conditions without panicking. The
`expect_*` family of macros cause an early return of [`anyhow::Error`] if the
expected condition is not met.

This crate is especially helpful in async integration tests that involve
provisioning and tearing down resources; rather than struggle to catch panics,
you can simply use `expect_*` instead of `assert_*` to return [`Result`].

See [the docs](https://docs.rs/expecting) for usage examples and more info.