refactoring the server under RSpec