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

RSpec: spec re-design and cleanup #150

Closed
translunar opened this issue Oct 4, 2013 · 9 comments
Closed

RSpec: spec re-design and cleanup #150

translunar opened this issue Oct 4, 2013 · 9 comments

Comments

@translunar
Copy link
Member

The one thing I really, really wish I'd done differently during design was to research RSpec a little more. It probably makes better sense to flip around all of the spec stuff so that instead of "NMatrix float64 should correctly invert your little sister," it does things like:

NMatrix#invert should correctly invert your float64 little sister.

This requires a bit more design. But it probably doesn't require rewriting too many examples -- just rearranging stuff. Good way to get involved in the project and learn RSpec. =)

@abcheromar
Copy link

It seems this might be my first stab at open source contribution. :)

@translunar
Copy link
Member Author

Oh, excellent. I actually began the process in 00_nmatrix_spec.rb (I think that's the right one), if you want an example.

If you feel up to it, there might be some research to be done here too — what else could we be doing better with our specs? I know a lot of people swear by Cucumber. Pros and cons of using it? But this is really optional. The important thing is that the spec becomes more standardized (as outlined in the issue).

Welcome!

@terrencekhng
Copy link

It seems a good way to get involved in the project. But I have to get to know a little about RSpec maybe.

@duggiefresh
Copy link

I've started work on the spec/00_nmatrix_spec. RSpec is moving forward with the expect syntax, however, the should syntax will still be supported. Just curious on what SciRuby prefers.

Here's some quick reading: http://betterspecs.org/#expect

@agarie
Copy link
Member

agarie commented Feb 11, 2014

@duggiefresh I don't think the other contributors are keen on changing it given the number of NMatrix tests. I'm fine either way, tho. 👍

@translunar
Copy link
Member Author

@duggiefresh This is a great guide. Go with the recommended practices from RSpec. Don't cling to our out-dated notions. =)

@translunar
Copy link
Member Author

@agarie This is actually the goal of this particular Issue. =) Changing things that are bad.

@duggiefresh
Copy link

Sweet. I hope to get the 00_nmatrix_spec finished sometime before the end of this week. Once I send in a PR, we can start a discussion around it and move forward from there. Thanks!

@agarie
Copy link
Member

agarie commented Feb 13, 2014

@MohawkJohn wonderful!

@duggiefresh did you try using the transpec converter mentioned on that link? It might be easier to just convert everything and fix the remaining bugs.

duggiefresh added a commit to duggiefresh/nmatrix that referenced this issue Feb 25, 2014
* Conversion to RSpec's `expect` syntax.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants