Add a helper method and a custom RSpec matcher