Macro insta::with_settings [−][src]
macro_rules! with_settings {
({ $($k : ident => $v : expr), * $(,) ? }, $body : block) => { ... };
}
Expand description
Settings configuration macro.
This macro lets you bind some settings temporarily. The first argument
takes key value pairs that should be set, the second is the block to
execute. All settings can be set (sort_maps => value
maps roughly
to set_sort_maps(value)
).
insta::with_settings!({sort_maps => true}, {
// run snapshot test here
});