If you're asking how to write RSpec matchers, the documentation is here.
If you're asking what the matcher should do, you could try checking to see if the object responds to the methods provided by paper_trail. For example
RSpec::Matchers.define :be_trailed do
match do |actual|
actual.respond_to?(:versions)
end
end