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

Reduce code size with array and loop for rspec test #198

Closed
wants to merge 1 commit into from
Closed

Reduce code size with array and loop for rspec test #198

wants to merge 1 commit into from

Conversation

MartinGoulet
Copy link
Contributor

@acmetech @dominicgoulet I want to know if it's a good idea to use loop with array in spec test to minimise the number of code line. I send you this request as an example.

@acmetech
Copy link
Contributor

Hey @MartinGoulet,

I prefer to leave things as discoverable/readable as possible in the tests. By using the shoulda-matchers we are already shortening the code significantly and maintaining/increasing readability.

The 'attribute accessor' tests should ideally be fleshed out to test the functionality of the method, not just test for its presence.

Thanks

@MartinGoulet MartinGoulet deleted the refactoring branch February 14, 2014 23:03
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.

None yet

2 participants