Skip to content

Commit

Permalink
account for rendering change in ruby 3.4 tests (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeen authored Nov 6, 2024
1 parent 4cad908 commit b377b99
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions spec/schema_diff_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b377b99

Please sign in to comment.