Fix RSpec3 matcher deprecations

This is an alternative solution to the one proposed in #160, without so much duplication. It has just +16/-4 lines compared to +106/-51. Also it's not issuing deprecations with RSpec 2.99. Of course it's still compatible with RSpec 2.14 and earlier.