Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Apr 13, 2020
1 parent 18eb1e7 commit 92c381f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Install `insta`:

Recommended way if you have `cargo-edit` installed:

```rust
```
$ cargo add --dev insta
```

Expand All @@ -67,7 +67,7 @@ dependency.

And for an improved review experience also install `cargo-insta`:

```rust
```
$ cargo install cargo-insta
```

Expand All @@ -87,7 +87,7 @@ to the old ones with the extra `.new` extension. Once you are satisifed
move the new files over. To simplify this workflow you can use
`cargo insta review` which will let you interactively review them:

```rust
```
$ cargo test
$ cargo insta review
```
Expand All @@ -101,7 +101,7 @@ For more information on updating see [Snapshot Updating].
The committed snapshot files will have a header with some meta information
that can make debugging easier and the snapshot:

```rust
```
---
expression: "&User{id: Uuid::new_v4(), username: \"john_doe\".to_string(),}"
source: tests/test_user.rs
Expand Down Expand Up @@ -130,7 +130,7 @@ snapshots into `.snap.new` files if no CI is detected.
When `new` is used as mode the `cargo-insta` command can be used to review
the snapshots conveniently:

```rust
```
$ cargo install cargo-insta
$ cargo test
$ cargo insta review
Expand All @@ -149,14 +149,14 @@ to pass so that all new snapshots are created in one go.

This can be enabled by setting `INSTA_FORCE_PASS` to `1`:

```rust
```
$ INSTA_FORCE_PASS=1 cargo test --no-fail-fast
```

A better way to do this is to run `cargo insta test --review` which will
run all tests with force pass and then bring up the review tool:

```rust
```
$ cargo insta test --review
```

Expand Down Expand Up @@ -339,7 +339,7 @@ old snapshot format will continue to be available but if you want to upgrade
them make sure the tests pass first and then run the following command
to force a rewrite of them all:

```text,ignore
```
$ cargo insta test --accept --force-update-snapshots
```

Expand Down

0 comments on commit 92c381f

Please sign in to comment.