You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new instances created by the grains exercise are all exactly alike.
Is it a better idea to make the methods class methods (instead of instance methods), and change the tests appropriately? This would keep the exercise consistent with the other exercises by testing class methods. Or am I missing the reason for having instances that are exactly the same?
If you agree with the logic of this, I can go ahead and change the exercise.
The text was updated successfully, but these errors were encountered:
Links to the files you are referencing would be nice :)
Grains exercise tests are definitely modifiable. And should not effect any solutions that I am aware of. The example.rb file uses a Class for no obvious (to me) reason. The tests use .new rather than .allocate which it could very well do.
The test also has a lot of duplication, where the actual object could be stored and reused.
My suggestion is go ahead and work up a pull request. It will exhibit your thoughts even more completely than a paragraph of words.
Worst thing that can happen is people talk about it and it doesn't get accepted.
The new instances created by the grains exercise are all exactly alike.
Is it a better idea to make the methods class methods (instead of instance methods), and change the tests appropriately? This would keep the exercise consistent with the other exercises by testing class methods. Or am I missing the reason for having instances that are exactly the same?
If you agree with the logic of this, I can go ahead and change the exercise.
The text was updated successfully, but these errors were encountered: