Expand description
BDD-style testing helpers for Presentar.
Provides describe, it, and context management for expressive tests.
§Example
use presentar_test::bdd::*;
#[test]
fn button_widget_tests() {
describe("Button", |ctx| {
ctx.before(|| {
// Setup code
});
ctx.it("renders with label", |_| {
// Test code
expect(true).to_be_true();
});
ctx.it("responds to click", |_| {
expect(1 + 1).to_equal(2);
});
});
}Structs§
- Expectation
- Wrapper for making assertions.
- Test
Context - Test context for BDD-style tests.
Functions§
- describe
- Describe a test suite.
- describe_
and_ assert - Run a describe block and assert all tests pass.
- expect
- Create an expectation from a value.