[][src]Macro insta::assert_ron_snapshot_matches

macro_rules! assert_ron_snapshot_matches {
    ($value:expr, @$snapshot:literal) => { ... };
    ($value:expr, {$($k:expr => $v:expr),*}, @$snapshot:literal) => { ... };
    ($value:expr, {$($k:expr => $v:expr),*}) => { ... };
    ($name:expr, $value:expr) => { ... };
    ($name:expr, $value:expr, {$($k:expr => $v:expr),*}) => { ... };
    ($value:expr) => { ... };
}

Asserts a Serialize snapshot in RON format.

This works exactly like assert_serialized_snapshot_matches but serializes in RON format instead of YAML which retains some type information for more accurate comparisions.

Example:

This example is not tested
assert_ron_snapshot_matches!("snapshot_name", vec[1, 2, 3]);

The third argument to the macro can be an object expression for redaction. It's in the form { selector => replacement }. For more information about redactions see redactions.

Additionally the name is optional. For more information see unnamed snapshots