Fix deprecation warnings: use new protocols for rspec 3