From 7dea70f2717e0325a7457664739e41dd31ac8523 Mon Sep 17 00:00:00 2001 From: Trey Pendragon Date: Thu, 9 Jan 2020 12:36:56 -0800 Subject: [PATCH] Don't actually set config for ID equality. This makes the coverage always work. Thanks to @dgcliff --- lib/valkyrie/id.rb | 2 -- spec/valkyrie/types_spec.rb | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/valkyrie/id.rb b/lib/valkyrie/id.rb index 204b6abdd..bf3395692 100644 --- a/lib/valkyrie/id.rb +++ b/lib/valkyrie/id.rb @@ -28,10 +28,8 @@ def default_equality(other) output = (other.class == self.class && other.state == state) return output if output == true if output == false && string_equality(other) && Valkyrie.config.id_string_equality.nil? - # :nocov: warn "[DEPRECATION] Valkyrie::IDs will always be equal to their string counterparts in 3.0.0. " \ "To silence this message, please either compare IDs or set Valkyrie.config.id_string_equality = true." - # :nocov: end false end diff --git a/spec/valkyrie/types_spec.rb b/spec/valkyrie/types_spec.rb index 2a9572bf3..c55746ec1 100755 --- a/spec/valkyrie/types_spec.rb +++ b/spec/valkyrie/types_spec.rb @@ -48,7 +48,7 @@ class Resource < Valkyrie::Resource end it "doesn't echo a deprecated message if configured" do - Valkyrie.config.id_string_equality = false + allow(Valkyrie.config).to receive(:id_string_equality).and_return(false) expect do expect(resource.thumbnail_id).not_to eq '123' end.not_to output(message).to_stderr