rsspec 0.4.0

A Ginkgo/RSpec-inspired BDD testing framework for Rust.
Documentation

rsspec — A Ginkgo/RSpec-inspired BDD testing framework for Rust

Write expressive, structured tests using a closure-based API with describe, context, it, lifecycle hooks, table-driven tests, and more.

Quick example

rsspec::run(|ctx| {
    ctx.describe("Calculator", |ctx| {
        ctx.it("adds two numbers", || {
            assert_eq!(2 + 3, 5);
        });

        ctx.context("with negative numbers", |ctx| {
            ctx.it("handles negatives", || {
                assert_eq!(-1 + 1, 0);
            });
        });
    });
});

Features

  • googletest — re-exports googletest matchers via rsspec::matchers
  • tokio — async test support via async_it, async_before_each, etc.