aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/chouette/vehicle_journey_at_stop_spec.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/models/chouette/vehicle_journey_at_stop_spec.rb b/spec/models/chouette/vehicle_journey_at_stop_spec.rb
index ae9823243..05a772dac 100644
--- a/spec/models/chouette/vehicle_journey_at_stop_spec.rb
+++ b/spec/models/chouette/vehicle_journey_at_stop_spec.rb
@@ -1,10 +1,10 @@
require 'spec_helper'
RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do
- subject { create(:vehicle_journey_at_stop) }
+ subject { build_stubbed(:vehicle_journey_at_stop) }
describe 'checksum' do
- let(:at_stop) { build_stubbed(:vehicle_journey_at_stop) }
+ subject(:at_stop) { create(:vehicle_journey_at_stop) }
it_behaves_like 'checksum support'
@@ -43,7 +43,7 @@ RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do
end
context "the different times" do
- let (:at_stop) { build_stubbed(:vehicle_journey_at_stop) }
+ let (:at_stop) { create(:vehicle_journey_at_stop) }
describe "without a TimeZone" do
it "should not offset times" do
@@ -52,11 +52,10 @@ RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do
end
end
-
describe "with a TimeZone" do
before(:each) do
stop = at_stop.stop_point.stop_area
- stop.time_zone = "Mexico City"
+ stop.update time_zone: "Mexico City"
end
it "should offset times" do
@@ -66,7 +65,7 @@ RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do
context "with a wrong Timezone" do
before do
- at_stop.stop_point.stop_area.time_zone = "Gotham City"
+ at_stop.stop_point.stop_area.update time_zone: "Gotham City"
end
it "should not offset times" do