Skip to content

available_classes dump on failure in 0.12.0 #243

Closed
@modosc

Description

@modosc

when upgrading from 0.11.0 to 0.12.0 we started seeing this in some rspec failures:

{:available_classes=>
  [SuperDiff::ActiveRecord::Differs::ActiveRecordRelation,
   SuperDiff::ActiveSupport::Differs::HashWithIndifferentAccess,
   SuperDiff::RSpec::Differs::CollectionContainingExactly,
   SuperDiff::RSpec::Differs::CollectionIncluding,
   SuperDiff::RSpec::Differs::HashIncluding,
   SuperDiff::RSpec::Differs::ObjectHavingAttributes,
   SuperDiff::Basic::Differs::Array,
   SuperDiff::Basic::Differs::Hash,
   SuperDiff::Basic::Differs::TimeLike,
   SuperDiff::Basic::Differs::DateLike,
   SuperDiff::Basic::Differs::MultilineString,
   SuperDiff::Basic::Differs::CustomObject,
   SuperDiff::Basic::Differs::DefaultObject]}
F

the error comes in rspec when using have_attributes on an ActiveRecord model:

                 Expected #<JobEvent id: "5991790f-4823-41e6-b075-5b0a1456d84e", created_at: #<ActiveSupport::TimeWithZone 2024-04-26 15:38:34+(17287/62500) +00:00 (UTC)>, event_name: "JobAssigned", event_source: "web", job_id: "e5d701a9-923a-4698-938f-44a740ca6da6", lat: nil, load_id: nil, lon: nil, occurred_at: #<ActiveSupport::TimeWithZone 2024-04-26 15:38:34+(17287/62500) +00:00 (UTC)>, payload: nil, state: "unloaded", updated_at: #<ActiveSupport::TimeWithZone 2024-04-26 15:38:34+(17287/62500) +00:00 (UTC)>>
       to have attributes (event_name: "LoadCompleted", event_source: "webhook", state: "load_completed")

the actual failure is the same in 0.11.0 and 0.12.0 but in 0.11.0 there's no printing of :available_classes - any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions