# 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: 11/20/2021, 2:19:31 PM