expect [#<RSMP::Alarm:1304, @timestamp: 2026-05-04 11:12:43.832505 +0200, @attributes: {"mType" => "rSMsg", "type" => "Alarm", "ntsOId" => "", "xNId" => "", "xACId" => "", "xNACId" => "", "cId" => "DL1", "aCId" => "A0302", "aSp" => "Issue", "ack" => "Acknowledged", "aS" => "Active", "sS" => "notSuspended", "aTs" => 2026-05-04 11:11:43.832492 +0200, "cat" => "D", "pri" => "1", "rvs" => [{"n" => "color", "v" => "green"}], "mId" => "62638e29-4e82-4294-baf9-0548baeba8af"}>, #<RSMP::Alarm:1312, @timestamp: 2026-05-04 11:12:43.832597 +0200, @attributes: {"mType" => "rSMsg", "type" => "Alarm", "ntsOId" => "", "xNId" => "", "xACId" => "", "xNACId" => "", "cId" => "TC", "aCId" => "A0303", "aSp" => "Suspend", "ack" => "notAcknowledged", "aS" => "inActive", "sS" => "Suspended", "aTs" => 2026-05-04 11:11:43.832593 +0200, "cat" => "T", "pri" => "2", "rvs" => [{"n" => "color", "v" => "red"}], "mId" => "73c7f777-67e1-493c-a715-604aa625f9ec"}>] to
be == [#<RSMP::Alarm:1304, @timestamp: 2026-05-04 11:12:43.832505 +0200, @attributes: {"mType" => "rSMsg", "type" => "Alarm", "ntsOId" => "", "xNId" => "", "xACId" => "", "xNACId" => "", "cId" => "DL1", "aCId" => "A0302", "aSp" => "Issue", "ack" => "Acknowledged", "aS" => "Active", "sS" => "notSuspended", "aTs" => 2026-05-04 11:11:43.832492 +0200, "cat" => "D", "pri" => "1", "rvs" => [{"n" => "color", "v" => "green"}], "mId" => "62638e29-4e82-4294-baf9-0548baeba8af"}>, #<RSMP::Alarm:1312, @timestamp: 2026-05-04 11:12:43.832597 +0200, @attributes: {"mType" => "rSMsg", "type" => "Alarm", "ntsOId" => "", "xNId" => "", "xACId" => "", "xNACId" => "", "cId" => "TC", "aCId" => "A0303", "aSp" => "Suspend", "ack" => "notAcknowledged", "aS" => "inActive", "sS" => "Suspended", "aTs" => 2026-05-04 11:11:43.832593 +0200, "cat" => "T", "pri" => "2", "rvs" => [{"n" => "color", "v" => "red"}], "mId" => "73c7f777-67e1-493c-a715-604aa625f9ec"}>]
✓ assertion passed test/rsmp/alarm_collector_spec.rb:43
I find this a bit noisy (especially for arrays), as the expectation is really only about the class. I think something this like would be enough:
When using
is_a()orbe ==to verify that an object is a specific class, for example:Then the --verbose output shows the entire object:
I find this a bit noisy (especially for arrays), as the expectation is really only about the class. I think something this like would be enough: