Skip to content

Conversation

viblo
Copy link
Contributor

@viblo viblo commented Sep 12, 2013

New assertion WithinDuration that asserts that two time.Time are within time.Duration of each other. Its useful when you dont know the exact time. A common example is if the tested method set a Created field on a struct to time.Now() and you want to assert that it was in fact set correctly.

matryer pushed a commit that referenced this pull request Sep 17, 2013
@matryer matryer merged commit ede833b into stretchr:master Sep 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants