From 35613992fec7342e95622ee174bc9fb83878b307 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 14 Nov 2018 14:33:32 +0100 Subject: [PATCH 1/2] rspec: by default use the safer bisect runner for bisecting --- spec/spec_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 17ca7b38e..7056b9f81 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -104,6 +104,11 @@ RSpec.configure do |config| config.infer_spec_type_from_file_location! config.tty = true + # Since rspec 3.8.0, bisect uses fork to improve bisection speed. + # This however fails as soon as we're running feature tests (which uses many processes). + # Default to the :shell bisect runner, so that bisecting over feature tests works. + config.bisect_runner = :shell + config.include Shoulda::Matchers::ActiveRecord, type: :model config.include Shoulda::Matchers::ActiveModel, type: :model config.include Shoulda::Matchers::Independent, type: :model From b6521625e437e94f2f6acf055a8ec5e361a28e0f Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 14 Nov 2018 14:34:12 +0100 Subject: [PATCH 2/2] procedure_spec: add missing Timecop.return statement Fix order-dependant test. --- spec/models/procedure_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/models/procedure_spec.rb b/spec/models/procedure_spec.rb index 0f26cdb33..9b5c7ece6 100644 --- a/spec/models/procedure_spec.rb +++ b/spec/models/procedure_spec.rb @@ -626,6 +626,7 @@ describe Procedure do describe "#export_filename" do before { Timecop.freeze(Time.zone.local(2018, 1, 2, 23, 11, 14)) } + after { Timecop.return } subject { procedure.export_filename }