Extract out ruby tests, and refactor staging specs