aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorTeddy Wing2017-05-24 12:10:56 +0200
committerRobert2017-05-29 08:49:52 +0200
commit49fda7e568f33add59086274b66349363cbf7d7d (patch)
treeb6cd9bbcb678ca6b6f95a6ad6b56edfe9b10637f /spec
parent6dcca154825e12278849c8d3d1cacdbd8410c312 (diff)
downloadchouette-core-49fda7e568f33add59086274b66349363cbf7d7d.tar.bz2
IncreasingTimeOrderValidator: Move #increasing_times to #validate_each
Get rid of the `#increasing_times` method since it no longer made sense to me to keep it separate. We're not doing anything extra in `#validate_each`, the only place where it's called, so move the method's contents to `#validate_each`. Rename the `record` argument to `vehicle_journey` as I expect this validator to only be used on a `VehicleJourney`. Rename the `describe` in the specs because we're not actually calling `#increasing_times` in the spec. Refs #870
Diffstat (limited to 'spec')
-rw-r--r--spec/models/chouette/vehicle_journey_at_stops_are_in_increasing_time_order_validator_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/chouette/vehicle_journey_at_stops_are_in_increasing_time_order_validator_spec.rb b/spec/models/chouette/vehicle_journey_at_stops_are_in_increasing_time_order_validator_spec.rb
index ed037bcc8..040b9db19 100644
--- a/spec/models/chouette/vehicle_journey_at_stops_are_in_increasing_time_order_validator_spec.rb
+++ b/spec/models/chouette/vehicle_journey_at_stops_are_in_increasing_time_order_validator_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Chouette::VehicleJourneyAtStopsAreInIncreasingTimeOrderValidator do
subject { create(:vehicle_journey_odd) }
- describe "#increasing_times" do
+ describe "#validate" do
before(:each) do
subject.vehicle_journey_at_stops[0].departure_time =
subject.vehicle_journey_at_stops[1].departure_time - 5.hour