From 4d11d8a395503024e9fedac10d0bc73577808d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 10 Sep 2022 00:15:44 +0200 Subject: [PATCH] Specify translation class name in dummy test class These tests were failing with Ruby 3.0 because we were getting an error when loading the `translations` association of the dummy class: ``` NameError: uninitialized constant DummyBanner::#::Translation ``` Specifying the `class_name` of the `translations` association solves the issue. --- spec/models/skip_validation_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/models/skip_validation_spec.rb b/spec/models/skip_validation_spec.rb index d5da860b9..8e18197e2 100644 --- a/spec/models/skip_validation_spec.rb +++ b/spec/models/skip_validation_spec.rb @@ -58,6 +58,7 @@ describe SkipValidation do translates :title, touch: true translates :description, touch: true include Globalizable + has_many :translations, class_name: "DummyBanner::Translation", foreign_key: "banner_id" validates_translation :title, presence: true validates_translation :description, presence: true