Skip to content

Commit f868b46

Browse files
committed
bottle-song: Use pretty_assertions
The strings being compared in the tests are rather long. If they don't match, it can be difficult to spot what's wrong from the output of the regular assert_eq macro. Using pretty_assertions solves this problem.
1 parent 6dfcdeb commit f868b46

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

exercises/practice/bottle-song/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ edition = "2024"
77
# The full list of available libraries is here:
88
# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml
99
[dependencies]
10+
11+
[dev-dependencies]
12+
pretty_assertions = "*"

exercises/practice/bottle-song/tests/bottle_song.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use bottle_song::*;
2+
use pretty_assertions::assert_eq;
23

34
#[test]
45
fn first_generic_verse() {

0 commit comments

Comments
 (0)