From 813b8aad24a88aa014c75487fe2856fa385d4cf6 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Wed, 26 Jun 2019 14:33:57 +0000 Subject: Fix failing spec/models/internal_id_spec.rb spec The spec is too strict about how many `current_version` should be called - if the spec is called separately, it's called 3 times, if all specs run it's called twice. This is similar to the change done in 9b752791624ce618810b9d65251582e56c37dee7 --- spec/models/internal_id_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/internal_id_spec.rb b/spec/models/internal_id_spec.rb index 806b4f61bd8..28630f7d3fe 100644 --- a/spec/models/internal_id_spec.rb +++ b/spec/models/internal_id_spec.rb @@ -158,7 +158,7 @@ describe InternalId do before do described_class.reset_column_information # Project factory will also call the current_version - expect(ActiveRecord::Migrator).to receive(:current_version).twice.and_return(InternalId::REQUIRED_SCHEMA_VERSION - 1) + expect(ActiveRecord::Migrator).to receive(:current_version).at_least(:once).and_return(InternalId::REQUIRED_SCHEMA_VERSION - 1) end it 'does not reset any of the iids' do -- cgit v1.2.1