Skip to content

Commit

Permalink
Improve shortest subject line test
Browse files Browse the repository at this point in the history
Mutation: Replace < with ==, which effectively makes the "shorest" item
be the last. So re-order the commit subject lines so that the shortest
is no longer the last.
  • Loading branch information
Notgnoshi committed Dec 30, 2024
1 parent 63d67b9 commit 1de9e76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion herostratus/src/rules/h002_shortest_subject_line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ mod tests {
#[test]
fn test_has_short_subject() {
let repo =
fixtures::repository::with_empty_commits(&["0123456789", "1234567", "1234"]).unwrap();
fixtures::repository::with_empty_commits(&["0123456789", "1234", "1234567", "12345"])
.unwrap();
let rules = vec![Box::new(ShortestSubjectLine::default()) as Box<dyn Rule>];
let achievements = grant_with_rules("HEAD", &repo.repo, rules).unwrap();
let achievements: Vec<_> = achievements.collect();
Expand Down

0 comments on commit 1de9e76

Please sign in to comment.