| 1 |
Index: schemars/tests/integration/test_helper.rs |
| 2 |
=================================================================== |
| 3 |
--- schemars.orig/tests/integration/test_helper.rs |
| 4 |
+++ schemars/tests/integration/test_helper.rs |
| 5 |
@@ -71,9 +71,10 @@ impl<T> TestHelper<T> { |
| 6 |
/// |
| 7 |
/// Run tests with the SNAPSHOTS env var set to "overwrite" to overwrite any changed snapshots. |
| 8 |
pub fn assert_snapshot(&self) -> &Self { |
| 9 |
- let common_path = format!("tests/integration/snapshots/{}.json", self.name); |
| 10 |
- let de_path = format!("tests/integration/snapshots/{}.de.json", self.name); |
| 11 |
- let ser_path = format!("tests/integration/snapshots/{}.ser.json", self.name); |
| 12 |
+ let stripped_name = self.name.strip_prefix("schemars/").unwrap_or(&self.name); |
| 13 |
+ let common_path = format!("tests/integration/snapshots/schemars/{}.json", stripped_name); |
| 14 |
+ let de_path = format!("tests/integration/snapshots/schemars/{}.de.json", stripped_name); |
| 15 |
+ let ser_path = format!("tests/integration/snapshots/schemars/{}.ser.json", stripped_name); |
| 16 |
|
| 17 |
if self.de_schema == self.ser_schema { |
| 18 |
snapbox::assert_data_eq!( |