Add a spec for MergeTrains::Car#train
What does this MR do and why?
I noticed there's no spec for this (admittedly simple) public method of MergeTrain::Car
. There is a bit of an odd nuance to it, that it returns a Train
regardless of the state of the car. So when a Car is merged
, Car#train
returns a Train
where Train#all_cars => []
Anyway having a spec and making it explicit isn't a bad idea.
How to set up and validate locally
Just running the spec file
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.