#assert #false #macro #elixir #test

refute

Add a refute! macro(Elixir inspired). Essentially assert!(false).

3 releases (stable)

1.0.1 Jan 18, 2023
0.1.0 Jan 18, 2023

#2311 in Rust patterns

MIT license

2KB

Refute

Allows to use refute!(smth) macro instead of assert!(!smth)

Example

#[test]
fn it_works() {
    refute!(false);
}

#[test]
fn default_user_is_not_an_admin() {
    refute!(User::default().admin)
}

No runtime deps