diff options
| author | Teddy Wing | 2017-05-24 12:22:21 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-05-26 13:20:56 +0200 |
| commit | e6da3ada61206ec0778fb1139bc61073cf404c7e (patch) | |
| tree | 22088f790829896074d30c81fe5d4550a320cfb7 /spec | |
| parent | 3564ad224a4f1e3a409e44a31950184e75920f2e (diff) | |
| download | chouette-core-e6da3ada61206ec0778fb1139bc61073cf404c7e.tar.bz2 | |
IncreasingTimeOrderValidator: Rename `#increasing_times_validate` method
I didn't like the name of this method because it wasn't super clear what
its intent was. Rename it to something that describes it better.
Refs #870
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/chouette/vehicle_journey_at_stops_are_in_increasing_time_order_validator_spec.rb | 8 |
1 files changed, 4 insertions, 4 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 f8d5b9ae4..976218d4f 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 @@ -23,7 +23,7 @@ describe Chouette::VehicleJourneyAtStopsAreInIncreasingTimeOrderValidator do end end - describe ".increasing_times_validate" do + describe ".validate_at_stop_times_must_increase" do let!(:vehicle_journey) { create(:vehicle_journey_odd) } subject { vehicle_journey.vehicle_journey_at_stops.first } @@ -35,7 +35,7 @@ describe Chouette::VehicleJourneyAtStopsAreInIncreasingTimeOrderValidator do vjas1.arrival_time = vjas2.arrival_time - 5.hour expect( Chouette::VehicleJourneyAtStopsAreInIncreasingTimeOrderValidator - .increasing_times_validate(vjas2, vjas1) + .validate_at_stop_times_must_increase(vjas2, vjas1) ).to be_falsey expect(vjas2.errors).not_to be_empty expect(vjas2.errors[:arrival_time]).not_to be_blank @@ -47,7 +47,7 @@ describe Chouette::VehicleJourneyAtStopsAreInIncreasingTimeOrderValidator do vjas1.departure_time = vjas2.departure_time - 5.hour expect( Chouette::VehicleJourneyAtStopsAreInIncreasingTimeOrderValidator - .increasing_times_validate(vjas2, vjas1) + .validate_at_stop_times_must_increase(vjas2, vjas1) ).to be_falsey expect(vjas2.errors).not_to be_empty expect(vjas2.errors[:departure_time]).not_to be_blank @@ -58,7 +58,7 @@ describe Chouette::VehicleJourneyAtStopsAreInIncreasingTimeOrderValidator do it "should not add errors" do expect( Chouette::VehicleJourneyAtStopsAreInIncreasingTimeOrderValidator - .increasing_times_validate(vjas2, vjas1) + .validate_at_stop_times_must_increase(vjas2, vjas1) ).to be_truthy expect(vjas2.errors).to be_empty end |
