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. Of course it's still compatible with RSpec 2.