From b377b996d5dbd995d6da403eeb8f990cbe258850 Mon Sep 17 00:00:00 2001 From: Jeff Keen Date: Tue, 5 Nov 2024 18:06:22 -0600 Subject: [PATCH] account for rendering change in ruby 3.4 tests (#484) --- spec/schema_diff_spec.rb | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/spec/schema_diff_spec.rb b/spec/schema_diff_spec.rb index 64bfd480..ae6d0038 100644 --- a/spec/schema_diff_spec.rb +++ b/spec/schema_diff_spec.rb @@ -490,9 +490,15 @@ def self.name end it "returns error" do - expect(diff).to eq([ - 'SchemaDiff::EmployeeResource: default sort changed from [{:foo=>"asc"}] to [{:foo=>"desc"}].' - ]) + if RUBY_VERSION >= "3.4" + expect(diff).to eq([ + 'SchemaDiff::EmployeeResource: default sort changed from [{foo: "asc"}] to [{foo: "desc"}].' + ]) + else + expect(diff).to eq([ + 'SchemaDiff::EmployeeResource: default sort changed from [{:foo=>"asc"}] to [{:foo=>"desc"}].' + ]) + end end end @@ -1204,9 +1210,15 @@ def self.name end it "returns error" do - expect(diff).to eq([ - 'Endpoint "/schema_diff/employees" had incompatible sideload allowlist. Was [{:positions=>"department"}, "same"], now ["positions", "same"].' - ]) + if RUBY_VERSION >= "3.4" + expect(diff).to eq([ + 'Endpoint "/schema_diff/employees" had incompatible sideload allowlist. Was [{positions: "department"}, "same"], now ["positions", "same"].' + ]) + else + expect(diff).to eq([ + 'Endpoint "/schema_diff/employees" had incompatible sideload allowlist. Was [{:positions=>"department"}, "same"], now ["positions", "same"].' + ]) + end end end end