From 6ad1812f2b322381f052723cb4b9a4ee8791cea2 Mon Sep 17 00:00:00 2001 From: Cory Streiff Date: Sat, 7 Dec 2024 15:35:10 +0100 Subject: [PATCH] Fix stubbed event classes --- spec/models/event_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index ba0ac526a5..98299f7a8c 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -18,11 +18,11 @@ let(:organization) { create(:organization) } describe "::types_for_select" do - let(:event_a) { Class.new } - let(:event_z) { Class.new } + let(:a_event) { Class.new { def self.name = "AEvent" } } + let(:z_event) { Class.new { def self.name = "ZEvent" } } before do - allow(described_class).to receive(:descendants).and_return([event_z, event_a]) + allow(described_class).to receive(:descendants).and_return([z_event, a_event]) end it "returns an array of ids and names" do