#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

#2488 in Rust patterns

Download history 38/week @ 2024-02-26 57/week @ 2024-03-04

95 downloads per month

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