# Custom Matcher in Rspec

  RSpec::Matchers.define :match_object_by_id do |expected|
    match { |actual| [actual.id](http://actual.id/) == [expected.id](http://expected.id/) }
  end
Last Modified: 1/5/2021, 2:07:29 PM