Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add singular form of spec metrics #41

Merged
merged 1 commit into from
Jul 3, 2015
Merged

Add singular form of spec metrics #41

merged 1 commit into from
Jul 3, 2015

Conversation

ItsASine
Copy link
Contributor

@ItsASine ItsASine commented Jul 2, 2015

sec and secs, min and mins, hour and hours


The specs all pass, though I will admit that I'm not good enough with regex to optimize it to match sec or secs but not second in any way but (?!second)secs?

That replace in test-helper was changing the spec display to be {test}ond in 3 places, like 1.1.2 {test}ond grandchild suite, so the specs were failing without the (?!second)

bcaudan added a commit that referenced this pull request Jul 3, 2015
Add singular form of spec metrics
@bcaudan bcaudan merged commit aba3235 into bcaudan:master Jul 3, 2015
@bcaudan
Copy link
Owner

bcaudan commented Jul 3, 2015

Thanks a lot for your help!

I made some refactorings:

  • 971e392: I prefer to make two regex to not fall into that "second" edge case
  • 5ed13b4: I extract a method for the pluralization logic

It is available in v2.4.0.

@ItsASine
Copy link
Contributor Author

ItsASine commented Jul 3, 2015

Looks good, thanks 👍

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