Skip to content

When comparing a recursive HashWithIndifferentAccess that does not match, diff may not be produced #59

Closed
@mcmire

Description

@mcmire

I'm not able to provide a full example since this is for work, but it looks something like:

expected = {
  'shipments' => [
    { 'estimated_delivery' => { 'from': '2019-05-06', 'to': '2019-05-09' }.with_indifferent_access }.with_indifferent_access
  ]
}.with_indifferent_access
actual = {
  'shipments' => [
    { 'estimated_delivery' => { 'from' => '2019-05-06', 'to' => '2019-05-09' } }
  ]
}
expect(actual).to eq(expected)

This test fails, but doesn't seem to produce a diff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions