Skip to content

Commit

Permalink
test: match new miette formatting of help
Browse files Browse the repository at this point in the history
  • Loading branch information
PurpleBooth committed Jan 11, 2025
1 parent 9d07720 commit 43216f9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
7 changes: 3 additions & 4 deletions docs/binaries/mit-pre-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ mit-pre-commit
Error: mit_pre_commit::errors::stale_author_error
× No authors set
help: Can you set who's currently coding? It's nice to get and give
the right credit. You can fix this by running `git mit` then the
initials of whoever is coding for example: `git mit bt` or `git mit
bt se`
help: Can you set who's currently coding? It's nice to get and give the
right credit. You can fix this by running `git mit` then the initials
of whoever is coding for example: `git mit bt` or `git mit bt se`
```

14 changes: 6 additions & 8 deletions docs/mit.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,9 @@ Error: mit_commit_message_lints::mit::lib::authors::serialise_authors_error
· │ ╰── invalid in toml:
· ╰── invalid in yaml:
╰────
help: `git mit-config mit example` can show you an example of what it
should look like, or you can generate one using `git mit-config
mit generate` after setting up some authors with `git mit-config
mit set`
help: `git mit-config mit example` can show you an example of what it should
look like, or you can generate one using `git mit-config mit generate`
after setting up some authors with `git mit-config mit set`
```

Expand All @@ -401,9 +400,8 @@ Error: mit_commit_message_lints::mit::lib::authors::serialise_authors_error
· │ ╰── invalid in toml:
· ╰── invalid in yaml:
╰────
help: `git mit-config mit example` can show you an example of what it
should look like, or you can generate one using `git mit-config
mit generate` after setting up some authors with `git mit-config
mit set`
help: `git mit-config mit example` can show you an example of what it should
look like, or you can generate one using `git mit-config mit generate`
after setting up some authors with `git mit-config mit set`
```
10 changes: 6 additions & 4 deletions mit-commit-message-lints/src/mit/cmd/set_commit_authors_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,14 @@ fn sets_the_expiry_time() {

assert!(
actual_expire_time < sec61min,
"{}",
"Expected less than {sec61min}, found {actual_expire_time}"
"Expected less than { sec
", {} found,POCH E UNIX since onds},
actual_expire
);
assert!(
actual_expire_time > sec59min,
"{}",
"Expected more than {sec59min}, found {actual_expire_time}"
"Expected more than {} seconds since UNIX EPOCH, found {}",
sec59min,
actual_expire_time
);
}
10 changes: 6 additions & 4 deletions mit-commit-message-lints/src/relates/cmd/set_relates_to_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ fn sets_the_expiry_time() {

assert!(
actual_expire_time < sec61min,
"{}",
"Expected less than {sec61min}, found {actual_expire_time}"
"Expected less than {}, found {}",
sec61min,
actual_expire_time
);
assert!(
actual_expire_time > sec59min,
"{}",
"Expected more than {sec59min}, found {actual_expire_time}"
"Expected more than {}, found {}",
sec59min,
actual_expire_time,
);
}

0 comments on commit 43216f9

Please sign in to comment.