aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorTeddy Wing2017-05-24 11:31:34 +0200
committerTeddy Wing2017-05-26 13:20:55 +0200
commit16c9f2b445de2af540db4280bde39666101e1eb0 (patch)
treeacb823b50344eaa48829dbd24d3b73faa3a4756d /script
parentec5f85038b00f1f69c85d94a042ecdad22d4e8cf (diff)
downloadchouette-core-16c9f2b445de2af540db4280bde39666101e1eb0.tar.bz2
IncreasingTimeOrder: Make `increasing_times_validate` a class method
Making this a class method allows us to test it more easily. Previously it was attached to `Chouette::VehicleJourneyAtStop`, and the tests I copied call it on a VehicleJourneyAtStop. It seems like instantiating a Validator class is kind of a pain, or at least a bit weird, since it's for internal Rails use. So we change it to a class method. Change `#exceeds_gap?` in this class to a class method also so we can continue to call it from `.increasing_times_validate`. Eventually we'll switch to the new version in the `TimeDuration` module. Comment out the tests for `#exceeds_gap?` for now as we'll be moving those into a new spec file for `TimeDuration` Refs #870
Diffstat (limited to 'script')
0 files changed, 0 insertions, 0 deletions