Repository navigation
Add spec for Enumerator::Lazy#chunk - #506
Conversation
|
It looks like the existing specs for Enumerator::Lazy all test for almost exactly the same things. Since I will otherwise shortly be adding four more files of that, I'm thinking of pulling out the shared tests into a shared examples group and using them with should_behave_like. |
|
When possible, shared specs are indeed better so there is less duplication and examples added for one method also means added to others methods. The chunk_spec.rb files can then define a few |
|
@joshgelbard Did you have the occasion to look at sharing those specs? |
|
Let's merge this, thank you for the new spec! |
Mostly copied and slightly altered the existing specs that seemed most similar. Will do #chunk_while and company along the same lines unless this is wrong.