From 33c9d0e13bd7211acbccce9ffd72fcef2267e703 Mon Sep 17 00:00:00 2001 From: Andreas Brandl Date: Wed, 2 May 2018 13:09:33 +0200 Subject: Fix shared example for AtomicInternalId. The problem is with a factory chain where something down the chain also requires an iid to be set. For this, the before block was too generic and would just blank out all iid fields. --- spec/support/shared_examples/models/atomic_internal_id_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/shared_examples/models/atomic_internal_id_spec.rb b/spec/support/shared_examples/models/atomic_internal_id_spec.rb index 6a6e13418a9..c64c0381d81 100644 --- a/spec/support/shared_examples/models/atomic_internal_id_spec.rb +++ b/spec/support/shared_examples/models/atomic_internal_id_spec.rb @@ -12,7 +12,7 @@ shared_examples_for 'AtomicInternalId' do subject { instance } before do - allow(InternalId).to receive(:generate_next).and_return(nil) + allow(InternalId).to receive(:generate_next).with(instance, scope_attrs, usage, anything).and_return(nil) end it { is_expected.to validate_presence_of(internal_id_attribute) } -- cgit v1.2.1