aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sql
diff options
context:
space:
mode:
authorTeddy Wing2017-05-24 11:31:34 +0200
committerRobert2017-05-29 08:49:52 +0200
commit278fb14a2dfedef96682a3be3d106d7d451ca483 (patch)
tree1a76c77efdf117024a680de6586ecbe227b22c07 /lib/sql
parent32aeba90d7c79505162a3aaf39094e3b2bb682d1 (diff)
downloadchouette-core-278fb14a2dfedef96682a3be3d106d7d451ca483.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 'lib/sql')
0 files changed, 0 insertions, 0 deletions