Fix build with RSpec3

* Use RSpec 3 syntax
* Address deprecation warnings