Skip to content

Commit

Permalink
test: inline snapshot for patch_exists
Browse files Browse the repository at this point in the history
It's easier to see what's going on when you have the context of the test inline
  • Loading branch information
eopb committed May 17, 2024
1 parent 9de9ba3 commit 2a7404f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
20 changes: 0 additions & 20 deletions tests/snapshots/tests__patch_exists.snap

This file was deleted.

19 changes: 18 additions & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,24 @@ fn patch_exists() {

let manifest = fs::read_to_string(working_dir_manifest_path).unwrap();

insta::assert_toml_snapshot!(manifest);
insta::assert_toml_snapshot!(manifest, @r###"
'''
[package]
name = "package-name"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
patch-package = "0.1.0"
[patch]
[patch.crates-io]
patch-package = { path = "u9KdJGBDefkZz" }
'''
"###);
}

/// When we add a patch we want to make sure that we're actually depending on the dependency we're
Expand Down

0 comments on commit 2a7404f

Please sign in to comment.