Fix RSpec deprecation warnings

I tried to keep the meaning of the tests the same, while updating to use the new RSpec syntax.