RSpec 3 compatible

This should now be compatible with RSpec 3 (but still backwards compatible).