Skip to content

Commit

Permalink
fix failure message indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanos committed Apr 21, 2014
1 parent 728e791 commit 01b076b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion matcher_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ var IsOnOrAfter = &matcher{
}

func timeMismatch(t1 time.Time, message string, t2 time.Time) string {
strT1, strT2 := t1.String(), t2.String()
strT1, strT2 := formatTime(t1), formatTime(t2)
return fmt.Sprintf("Expected\n%s\n%s\n%s", strT1, message, strT2)
}

func formatTime(t time.Time) string {
return format.Indent + t.String()
}

0 comments on commit 01b076b

Please sign in to comment.