Rspec compatibility

This will make the gem work with newer versions of Rspec, fixing deprecation warnings and an ArgumentError exception.