-
Notifications
You must be signed in to change notification settings - Fork 5
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
Proposing some test style standards #12
Comments
👍 |
I think if we are going to refer to class methods, we should use the |
I really wish that rspec didn't remove |
I see your reasoning with
|
Do this... |
This will be a bit complicated since we'll have rspec 2, rspec 3, and minitest. But I totally think its worth it. I've already started using rspec 3 on some projects and its pretty sweet. |
We've proven, by having and using this style guide, that we all have at least some amount of respect for achieving a reasonable level of consistency amongst our code. It creates less confusion, makes jumping into code and understand what's happening much less of a chore, not to mention how much easier various editor tasks are if we can at least hope for that code consistency. All of that said, I'd like to propose we apply the style guide towards our testing consistency as well.
For RSpec
context
anddescribe
are aliases. While I understand there is a difference in readingcontext
vs. readingdescribe
, its the same argument betweenmap
andcollect
. They both do the same thing, we know they do the same thing, and we confuse the use of the two. Perhaps though, that difference can expose some test meaning - I think that argument is worth settling in the style guide. This is one example of a style detail that I would like to put down for future and enforce a standard.I would be in favor of writing a guide for both TestUnit and RSpec such that we can continue to aim towards reasonable consistency in our development efforts. There currently are not many (of any) TestUnit style guides in the community (does that say something?), but I think some simple standards could be set, especially if we're to continue using it on newer applications.
Existing links to check out:
The text was updated successfully, but these errors were encountered: